Re: Refreshing Message headers

Christian Ebert <[email protected]> Tue, 2 Nov 2021 07:47:08 +0000
Newsgroups gmane.network.slrn.user
Organization Phloxic Productions https://phloxic.productions
Message-ID <YYDs/[email protected]>
* Tavis Ormandy on Tuesday, November 02, 2021 at 05:01:18 -0000:
> On 2021-10-30, Duke Normandin wrote:
>> Re-visiting slrn after a long hiatus. Very retro! Very cool!
>> =

>> Is there a way to refresh the headers screen while viewing it? A
>> command that says, e.g. "Get all new posts!" ?
> =

> Hmm, I think there isn't in the header view, but you can quit to the
> group view and refresh (press 'q' then 'G').
> =

> If you really want it you could make a macro :)

For instance in your macro directory have a file called =

refresh-in-article-mode.sl:

implements ("RefreshInArticleMode");

static define refresh ()
{
   variable msgid =3D extract_article_header ("Message-ID"),
     show_article =3D get_variable_value ("show_article"),
     isvisible =3D is_article_visible (),
     cutoff =3D get_variable_value ("query_read_group_cutoff");

   call ("undelete"); % do not expunge article
   call ("quit");

   % in group display now
   call ("refresh_groups");
   % silently reenter group
   set_integer_variable ("query_read_group_cutoff", 0);
   call ("select_group");
   set_integer_variable ("query_read_group_cutoff", cutoff);

   () =3D locate_header_by_msgid (msgid, 0);
   % display article if it was shown before:
   if (isvisible =3D=3D 3 and show_article =3D=3D 0 ||
       isvisible !=3D 3 and show_article !=3D 0)
     call ("hide_article");
}

definekey ("RefreshInArticleMode->refresh", "R", "article");


And in your slrnrc:

interpret "refresh-in-article-mode.sl"

-- =

LAST SHIP HOME                      --->> https://lastshiphome.de
Official Selection                          DOK.fest M=FCnchen 2018
German Ocean Film Award                        CineMare Kiel 2019
Best Documentary Feature   Wales International Film Festival 2020