🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #43757

Re: SLRN Macros/Hooks

#43757
From: Dawn Owens-Nicholson
Date: Wed, 14 Oct 1998 00:00
51 lines
2489 bytes
Thorfinn wrote:
> Anyway... Here's what I do in order to get slrn to always display
> headers and scores in the article list window:

Actually, you can't guarantee the full header list will always show.
Another macro could call("toggle_headers") and odd number of times and throw
off your macro entirely.

>    if (done_singleton_show_headers == 0)

If you really want to do this, however, I suggest using:

     !if (done_singleton_show_headers)

it's more S-Langish.

>       variable oldflags = get_header_flags();

Thanks for saving state and restoring it at the end, I appreciate it.  It's
nice to know someone besides me is interested in macros that do this.
However, I don't see what this has to do with showing headers.  You never
use or modify the flags anywhere in your macro (besides the
set_header_flags() at the end); neither call("toggle_headers") nor
call("hide_article") modify the article flags.

>       call("toggle_headers");

This is the buggy part.  If there were a way to conditionally do this, it
could be fixed.

>       call("hide_article");

This should be done conditionally since you don't want to toggle
hiding/unhiding the article:

        if (is_article_visible ()) call ("hide_article");  % hide the article

>       call("redraw");

Actually, you don't need to redraw the screen.  Setting display_scores is
sufficient to show/hide the scores.  But this brings up a larger point--what
does showing scores have to do with showing headers?

> Something like it on a per newsgroup basis is possible, if you, say,
> keep track of the state of "toggle_headers" [...]

In general, macros like this aren't a really good idea for wide
dissemination because when the wrapper functions aren't used consistently,
they fail when they're used.

Technical Details
Message-ID: <slrn72a39n.j19.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-mail
References: <slrn7261p3.1g7.perlman@linguist.dartmouth.edu> <slrn728b1d.ma.thorfinn@tertius.net.au>

Show Full Headers
Complete Article Headers
Message-ID: <slrn72a39n.j19.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: SLRN Macros/Hooks
Date: Wed, 14 Oct 1998 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <slrn7261p3.1g7.perlman@linguist.dartmouth.edu> <slrn728b1d.ma.thorfinn@tertius.net.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-mail
X-Deja-AN: 401111305
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.5.3 (UNIX)
Newsgroups: news.software.readers