Article View: news.software.readers
Article #39512Re: slrn catchup question? (Was: Re: better regexp for slrn/slang?)
From: David Goh
Date: Thu, 12 Mar 1998 00:00
Date: Thu, 12 Mar 1998 00:00
47 lines
2270 bytes
2270 bytes
In news.software.readers, on 8 Mar 1998 21:30:25 GMT
Jan Hlavacek <lahvak@math.mps.ohio-state.edu> wrote:
>On 8 Mar 1998 17:16:41 GMT, Ralf Hildebrandt <R.Hildebrandt@tu-bs.de>
>wrote:
>> To make that work I have to undelete it and afterwards mark it using *...
>You can try this:
>define undelete_and_star ()
>{
> set_header_flags ((get_header_flags () & ~(HEADER_READ)) | HEADER_TAGGED);
>}
>definekey ("undelete_and_star", "*", "article");
That's nice, but you lose the toggle ability...
So I re-wrote it. :)
Here's the rewrite:
%
% Ensure that the "*" command marks something unread if it's tagging it.
%
define undelete_and_star()
{
variable old_flags = get_header_flags();
variable new_flags = old_flags;
if (old_flags & HEADER_TAGGED)
{
% Currently tagged. Make it untagged.
new_flags = (old_flags & ~(HEADER_TAGGED));
}
else
{
% Currently untagged. Make it unread and tagged.
new_flags = ((old_flags & ~(HEADER_READ)) | HEADER_TAGGED);
}
set_header_flags(new_flags);
}
definekey ("undelete_and_star", "*", "article");
--
| david@unico.com.au (David Goh, Unico Computer Systems, +61-3-9866-5688)
Test-tube babies shouldn't throw stones.
Technical Details
Message-ID:
<6e79mk$i8j@padre.unico.com.au>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:
<slrn6g0a7p.297.nospam@mouse.loran.com> <slrn6g0eo4.sbk.R.Hildebrandt@stahlw00.stahl.bau.tu-bs.de> <slrn6g35bc.d3t.davis@mygir.davis.net> <slrn6g5kjp.4oo.R.Hildebrandt@stahlw00.stahl.bau.tu-bs.de> <slrn6g63fh.p0o.lahvak@math.mps.ohio-state.edu>Show Full Headers
Complete Article Headers
Message-ID: <6e79mk$i8j@padre.unico.com.au> Subject: Re: slrn catchup question? (Was: Re: better regexp for slrn/slang?) Date: Thu, 12 Mar 1998 00:00:00 +0000 From: david@unico.com.au (David Goh) References: <slrn6g0a7p.297.nospam@mouse.loran.com> <slrn6g0eo4.sbk.R.Hildebrandt@stahlw00.stahl.bau.tu-bs.de> <slrn6g35bc.d3t.davis@mygir.davis.net> <slrn6g5kjp.4oo.R.Hildebrandt@stahlw00.stahl.bau.tu-bs.de> <slrn6g63fh.p0o.lahvak@math.mps.ohio-state.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-mail X-Deja-AN: 333170656 X-Newsgroup: news.software.readers Reply-To: david@unico.com.au X-Silly-Line: Do not meddle in the affairs of wizards, for you are crunchy and good with ketchup. Organization: UNICO Computer Systems, Melbourne, Australia Newsgroups: news.software.readers X-Religion: linux slrn mutt vim