Article View: news.software.readers
Article #256132Re: slrn keyboard commands
From: J.B. Nicholson-Owens
Date: Tue, 05 Nov 2013 02:18
Date: Tue, 05 Nov 2013 02:18
33 lines
2469 bytes
2469 bytes
Looking at the S-Lang change notes,
http://www.jedsoft.org/slang/doc/html/slang-23.html#ss23.2 in
particular, I see the function should probably read:
#v+
define my_mark_thread_as_read ()
{
% Note the article we started on and the collapse status
% of the current thread so we can do this job without
% disturbing the display.
variable
starting_article = extract_article_header ("Message-ID"),
thread_was_collapsed = is_thread_collapsed ();
collapse_thread ();
call ("delete");
variable ending_article = extract_article_header ("Message-ID");
% Leave the thread marked read as it was collapsed/uncollapsed.
ifnot (thread_was_collapsed)
{
() = locate_header_by_msgid (starting_article, 0);
uncollapse_thread ();
}
% Put the cursor where the interactive function "delete" left it.
() = locate_header_by_msgid (ending_article, 0);
}
definekey ("Global->my_mark_thread_as_read", "X", "article");
#v-
which is a wee bit simpler and uses ifnot() which is (as of S-Lang
2.1) preferred over the older (and now deprecated) !if().
Technical Details
Message-ID:
<slrnl7glbf.3vh.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!border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.albasani.net!.POSTED!not-for-mailReferences:
<slrnl6s4a0.26a.mr@irc.sandman.net> <slrnl7bopa.qm3.philb@ah61.is-a-geek.com> <slrnl7dj62.mup.jbn@forestfield.org>Show Full Headers
Complete Article Headers
Message-ID: <slrnl7glbf.3vh.jbn@forestfield.org> Subject: Re: slrn keyboard commands Date: Tue, 05 Nov 2013 02:18:23 +0000 From: "J.B. Nicholson-Owens" <jbn@forestfield.org> References: <slrnl6s4a0.26a.mr@irc.sandman.net> <slrnl7bopa.qm3.philb@ah61.is-a-geek.com> <slrnl7dj62.mup.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!border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.albasani.net!.POSTED!not-for-mail Newsgroups: news.software.readers Organization: albasani.net Lines: 33 X-Trace: news.albasani.net Xqp/xdpN9Jbxgcom1oSLyIs0S3zitAKsriv8VnhijVIuo+u1RN5PxY6G7WUv1S8qT2msFSlRhBytP4mdPpl5tA== NNTP-Posting-Date: Tue, 5 Nov 2013 02:18:23 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="pEsZqeGhgpH2PF7vWamNTXk3OW1lusqjk/A7pW2Tlk3YxwPjAvmOUCMtwG3ienqRAu9tQz2LJ4STCj08CQV1EZoAOoAMxshFwv6OqPIhSRim8Vap7mJxqDE0y82+o8xf"; mail-complaints-to="abuse@albasani.net" User-Agent: slrn/pre1.0.0-18 (Linux) Cancel-Lock: sha1:1Ao99gI17wG0d12HonN9z+cP1CI= X-Original-Bytes: 2170