Article View: news.software.readers
Article #146203Re: [slrn] mark all newsgroups read?
From: J.B. Nicholson-Owens
Date: Mon, 12 Apr 2004 19:04
Date: Mon, 12 Apr 2004 19:04
64 lines
2991 bytes
2991 bytes
Larry Gagnon wrote:
> Is there a way to mark all newgroups read? At present I just go down my
> list of a dozen or so newsgroups hitting the "c" key at each group. Is
> there perhaps an easier way to do it?
This might be easier for you:
#v+
implements ("my");
static define catchup_all_groups ()
{
% Preserve the prefix argument and leave it available for use inside
% this function. Restore the prefix argument when this macro returns.
variable prefix_argument = get_prefix_arg ();
reset_prefix_arg ();
EXIT_BLOCK
{
if (prefix_argument !=-1) set_prefix_argument (prefix_argument);
}
variable
starting_group = current_newsgroup (),
previous_confirm_actions = get_variable_value ("confirm_actions"),
last_catchup_group = "";
% If no groups are listed, there's nothing to do.
if (starting_group == "") return ();
% Turn off confirmation. We'll reset it back later.
set_integer_variable ("confirm_actions", 0);
% This is where the groups are all marked read.
call ("bob");
do
{
last_catchup_group = current_newsgroup ();
call ("catchup");
}
while (last_catchup_group != current_newsgroup ());
% Reset confirmation and current newsgroup giving the appearance the
% cursor never moved and the preferences remain untouched.
set_integer_variable ("confirm_actions", previous_confirm_actions);
set_input_string (starting_group);
call ("add_group");
}
#v-
Save the code (everything between the #v+ and #v- marks) into a file
("~/my_macros.sl") and then load the file from your slrnrc by appending the
following lines to your slrnrc:
interpret "my_macros.sl"
setkey group my->catchup_all_groups "%"
As you can see, this will load the functions in the file and assign a key
to catchup_all_groups() in the "my" namespace. In the future you can add
more macros to this file (and this namespace) without clobbering anything
else.
Happy newsreading.
Technical Details
Message-ID:
<slrnc7lqr1.rof.jbn@forestfield.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.20140922.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!feed.news.tiscali.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mailReferences:
<106ofdq5gh4n3b0@corp.supernews.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnc7lqr1.rof.jbn@forestfield.org> Subject: Re: [slrn] mark all newsgroups read? Date: Mon, 12 Apr 2004 19:04:09 +0000 From: "J.B. Nicholson-Owens" <jbn@forestfield.org> References: <106ofdq5gh4n3b0@corp.supernews.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ash.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!feed.news.tiscali.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail Newsgroups: news.software.readers Organization: Forest Field OmniMedia Lines: 64 NNTP-Posting-Host: forestfield.org (208.216.67.173) X-Trace: news.uni-berlin.de 1081796649 923770 I 208.216.67.173 ([35848]) Mail-Copies-To: nobody User-Agent: slrn/0.9.8.0 (Linux)