Re: mark read, but no delete

"J.B. Nicholson-Owens" <[email protected]> Thu, 13 Nov 2014 18:41:17 -0600
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Dale wrote:
> how can I make sure my messages are marked read but not deleted?

It sounds like you could use a macro to do this job. The macro could 
automatically mark all articles unread before you leave the group.

You'll want to consider a few caveats:

- if there's some way you want to indicate articles you /really/ want to 
mark as read when you leave article mode. In other words, since you're 
essentially taking away slrn's main method of marking articles as read 
you may want some way to tell slrn which articles to mark as read and 
then have the macro honor that setting.

- unless you're reading news from a server you control, the server will 
typically expire articles to make room for new articles and you'll lose 
access to the expired articles anyway.

- if you're looking to get access to old articles you can reconstruct 
threads with ESC 1 ESC p to add parent and child articles.

With those caveats, perhaps this will work:

define my_mark_all_unread_articles ()
{
    % To avoid lingering prefix arguments from
    % making the call()ed intrinsics behave
    % differently, we store, reset, and replace
    % the prefix argument (see end of the function
    % for the restoration).
    variable starting_prefix_argument = get_prefix_arg ();
    reset_prefix_arg ();

    % If you're about to be prompted for marking all
    % articles unread, suppress this prompt to make
    % uncatchup_all automatic.
    if (get_variable_value ("confirm_actions") & 1)
      set_input_chars ("y");
    call ("uncatchup_all");

    if (starting_prefix_argument != -1)
      set_prefix_argument (starting_prefix_argument);
}

ifnot (register_hook ("article_mode_quit_hook", 
"my_mark_all_unread_articles") & 1)
{
    message ("Cannot register my_mark_all_unread_articles() with 
article_mode_quit_hook!");
}

I've added enough comments so you can see what I was trying to do even 
if I got it wrong.

Testing this should be straightforward enough: load the above, enter a 
group, mark some articles as read, and quit the group. The unread count 
should remain the same and when you re-enter the group you should see 
the articles you just marked read.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk