Article View: news.software.readers
Article #46028Re: [SLRN] how to delete automarically reply threads?
From: Dawn Owens-Nicholson
Date: Tue, 19 Jan 1999 00:00
Date: Tue, 19 Jan 1999 00:00
71 lines
3034 bytes
3034 bytes
Matthias.Maisenbacher wrote:
> I'm looking for a method (maybe a macro) to delete all threads which
> start with a re: arcicle.
After going back and forth on this, here's another way to do it. Save this
into a file, and run it from article_mode_hook() for the groups you want to
prune in this way. This doesn't kill threads, just mark them read (or
deleted). Killing these threads would require a longer macro and more
execution time. You shouldn't need to kill the articles if you use prev,
next and scroll_dn (by default--"p", "n" and spacebar, respectively) to read
articles.
Happy newsreading!
% Delete visual-threads where the thread head article % -*- slang -*-
% matches "^[rR][eE]:".
%
% Author: J.B. Nicholson-Owens
%
% Matthias Maisenbacher <Matthias.Maisenbacher@gmx.de> was interested in this.
%
% Note: slrn's delete_thread intrinsic is different from:
%
% loop (thread_size () - 1)
% {
% set_header_flags (get_header_flags () | HEADER_READ);
% () = header_down (1);
% }
% set_header_flags (get_header_flags () | HEADER_READ);
%
% because the latter leaves the cursor at the next thread. The
% intrinsic leaves the cursor at the next unread article, and is
% therefore not applicable to this task.
define matthias_delete_threads ()
{
if (is_group_mode ())
error (_function_name () + " doesn\'t work in group mode!");
variable
thread_was_collapsed = 0,
starting_article = extract_article_header ("Message-ID"),
starting_thread_was_collapsed = is_thread_collapsed ();
call ("header_bob");
do
{
thread_was_collapsed = is_thread_collapsed ();
if (string_match (extract_article_header ("Subject"), "^[rR][eE]:", 1))
{
uncollapse_thread ();
loop (thread_size () - 1)
{
set_header_flags (get_header_flags () | HEADER_READ);
() = header_down (1);
}
set_header_flags (get_header_flags () | HEADER_READ);
if (thread_was_collapsed) collapse_thread ();
}
else !if (thread_was_collapsed) () = header_down (thread_size () - 1);
}
while (header_down (1));
set_input_string (starting_article);
call ("locate_header_by_msgid");
if (starting_thread_was_collapsed) collapse_thread ();
}
Technical Details
Message-ID:
<slrn7aa3tn.hq7.bluemoon@ux6.cso.uiuc.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!not-for-mailReferences:
<77f9t2$eo8$2@news.fr.internet.bosch.de>Show Full Headers
Complete Article Headers
Message-ID: <slrn7aa3tn.hq7.bluemoon@ux6.cso.uiuc.edu> Subject: Re: [SLRN] how to delete automarically reply threads? Date: Tue, 19 Jan 1999 00:00:00 +0000 From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson) References: <77f9t2$eo8$2@news.fr.internet.bosch.de> 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!not-for-mail X-Deja-AN: 434588771 Organization: University of Illinois at Urbana-Champaign User-Agent: slrn/0.9.5.4 (UNIX) Newsgroups: news.software.readers