Article View: news.software.readers
Article #80138Re: Separating article read and article index in slrn
From: Stephane Gibier
Date: Sun, 10 Jun 2001 07:45
Date: Sun, 10 Jun 2001 07:45
191 lines
5872 bytes
5872 bytes
Alex Lee <spork@vardaman.stanford.edu> wrote :
>Is there any way to configure slrn to browse through a group's article
>listing and to read articles in the same way mutt does?
This is a frequently request and I think that article mode would be
splitted in header/body mode too. But, you can use the following macros to
browse headers and articles in the same way (e.g. with arrows cursors) :
#v+
% smartkeys.sl
implements("my");
private variable current_article = NULL;
static define group_mode_hook () { current_article = NULL; }
static define article_smartup ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("up");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("article_lineup");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("article_lineup");
}
}
static define article_smartdown ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("down");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("article_linedn");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("article_linedn");
}
}
static define article_smartpageup ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("pageup");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("article_pageup");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("article_pageup");
}
}
static define article_smartpagedn ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("pagedn");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("article_pagedn");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("article_pagedn");
}
}
static define article_smartbob ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("header_bob");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("art_bob");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("art_bob");
}
}
static define article_smarteob ()
{
switch (is_article_visible ())
{
case (0):
% NO article is visible
call ("header_eob");
return ();
}
{
case (1):
% DIFFERENT article is visible
if (current_article == NULL) return ();
() = locate_header_by_msgid (current_article, 0);
call ("art_eob");
}
{
case (3):
% CURRENT article is visible
current_article = extract_article_header ("Message-ID");
call ("art_eob");
}
}
definekey( "my->article_smartup", "\e[A", "article" );
definekey( "my->article_smartdown", "\e[B", "article" );
definekey( "my->article_smartpageup", "\e[5~", "article" );
definekey( "my->article_smartpagedn", "\e[6~", "article" );
definekey( "my->article_smartbob", "\e[1~", "article" );
definekey( "my->article_smartbob", "\e[7~", "article" );
definekey( "my->article_smarteob", "\e[4~", "article" );
definekey( "my->article_smarteob", "\e[8~", "article" );
#v-
and you can use it in your .slrnrc setup file :
#v+
% .slrnrc
interpret News/macros/smartkeys.sl
#v-
This is an old macros written by a someone in this newsgroup. I think it
would be nice to call the new intrinsic functions (article_line_up, etc...)
since some of them are renamed.
Hope this helps.
--
St�phane Gibier <sgibier@mail.dotcom.fr>
La jeune fille se tient sur la berge du ravin
Yn wrhar svyyr fr gvrag fhe yn iretr qh enoova
Technical Details
Message-ID:
<slrn9i69cp.6t8.sgibier@hermes.gibier.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!grolier!nerim.net!norfair.nerim.net!hermes.gibier.org!not-for-mailReferences:
<slrn9i5h41.4t4.spork@vardaman.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn9i69cp.6t8.sgibier@hermes.gibier.org> Subject: Re: Separating article read and article index in slrn Date: Sun, 10 Jun 2001 07:45:29 +0000 From: sgibier@mail.dotcom.fr (Stephane Gibier) References: <slrn9i5h41.4t4.spork@vardaman.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!grolier!nerim.net!norfair.nerim.net!hermes.gibier.org!not-for-mail Newsgroups: news.software.readers Organization: Olympus Lines: 190 NNTP-Posting-Host: hermes.gibier.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: norfair.nerim.net 992160068 81694 62.4.18.4 (10 Jun 2001 08:01:08 GMT) X-Complaints-To: abuse@nerim.net NNTP-Posting-Date: Sun, 10 Jun 2001 08:01:08 +0000 (UTC) Mail-Copies-To: nobody User-Agent: slrn/0.9.7.1 (Linux)