Article View: news.software.readers
Article #42727[slrn] Preventing an S-Lang macro from aborting.
From: Lloyd Zusman
Date: Sat, 15 Aug 1998 00:00
Date: Sat, 15 Aug 1998 00:00
61 lines
2324 bytes
2324 bytes
By means of the `interpret' command, I'm loading a group of S-Lang
macros when I start up Slrn (version 0.9.5.2). One of these macros
(enclosed below) is a slight variation on a macro that's included
among the sample macros that come with Slrn: it searches the entire
collection of articles in a newsgroup for occurrences of a specified
regexp.
It works great under normal conditions, but sometimes the news server
I use expires articles whose headers remain. When this happens, the
macro aborts with an error message on the offending article, and I
have to re-invoke it in order to make it continue looping through the
newsgroup. This can be inconvenient when there are a number of
article-less headers in the newsgroup.
Is there any way to modify this S-Lang macro so that it will
automatically skip to the next article instead of aborting when this
kind of error occurs?
Thanks in advance.
------------------------ macro starts here ------------------------
variable Last_Art_Search_Str = "";
define search_newsgroup ()
{
variable str;
variable flags;
str = read_mini ("Search for regexp", Last_Art_Search_Str,
Last_Art_Search_Str);
!if (strlen (str))
return;
Last_Art_Search_Str = str;
uncollapse_threads ();
do
{
flags = get_header_flags ();
if (re_search_article (str))
{
pop ();
return;
}
set_header_flags (flags);
call ("hide_article");
update ();
}
while (header_down (1));
error ("Not found.");
}
--
Lloyd Zusman
l...@asfast.com
Technical Details
Message-ID:
<lt7m09d7sr.fsf@asfast.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <lt7m09d7sr.fsf@asfast.com> Subject: [slrn] Preventing an S-Lang macro from aborting. Date: Sat, 15 Aug 1998 00:00:00 +0000 From: Lloyd Zusman <l...@asfast.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 381548902 X-Trace: 903231815 NHG18.M.GE264CCFD usenet46.supernews.com Organization: http://www.supernews.com, The World's Usenet: Discussions Start Here Newsgroups: alt.lang.s-lang,news.software.readers X-Complaints-To: news...@supernews.com