🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #60515

Re: [slrn] How to keep read messages visible?

#60515
From: Dawn Owens-Nicholson
Date: Fri, 14 Apr 2000 00:00
116 lines
6266 bytes
Walter Dnes wrote:
>   Monday, a new thread shows up...
>     Joe Blow    Scientific discovery... 1 + 1 = 2
>     John Smith  |_
>     John Doe    | |_
>     Susie Q     |_
> 
>   I read all the articles, which are marked "D".

So far, this is what slrn will do by default (assuming you have
auto_mark_article_as_read set to non-zero or you mark them read yourself).

>   Tuesday, I run slrnpull, and there are no new articles in the thread.
> I do not want to see the thread.

You are still totally within slrn's default state (as long as you don't
explicitly request to see old articles).

>   Wednesday, I run slrnpull, and there is one new article.  In the
> collapsed threadview I'd like to see
>     Mr Math     Re: Scientific discovery... 1 + 1 = 2

*Now* I see what you're getting at and my answer is: you can't do that in an
efficient way with macros.  It can be done, but it would involve two things:

 (1) Not seeing collapsed threads as collapsed threads--slrn won't show a
     collapsed thread with the topmost unread article as though it were the
     head of the thread.  You might already be familiar with what slrn would
     show you:

        %  Joe Blow    Scientific discovery... 1 + 1 = 2

     with the percent sign indicating "not all the articles in this thread
     have been marked read".  You may see a collapsed thread, depending on
     how many articles remain unread in the thread when you collapse it. If
     you want to see 5 as the thread count for this collapsed thread, it
     won't work that way.  If you want to see 1, you'll be okay.

 (2) A lot of parent & child article fetches and (depending on how much you
     want this change to be seamlessly integrated into slrn via macros) a
     lot of intrinsic wrappers.  Intrinsic wrappers are almost always a
     hassle to integrate into other macros later on.

>  In the expanded view, I'd like to see...
> 
>  D  Joe Blow    Scientific discovery... 1 + 1 = 2
>  D  John Smith  |_
>  D  John Doe    | |_
>     Mr Math     |   |_
>  D  Susie Q     |_

If you would like this, it can be done in a somewhat half-baked way that
won't be too slow to use because you get your news via slrnpull and a local
spool.  To do it, wrap the collapse and uncollapse intrinsics so when you
collapse the thread you:

  (1) Store a list of all the articles marked read in some variable.
  (2) Mark the entire group unread except for the articles in the
      thread to be collapsed.  It's faster to mark everything unread
      and mark read the articles you didn't want to change.
  (3) Expunge the thread articles (thus deleting only the articles
      marked read at the time you collapsed the thread).
  (4) Collapse the thread.
  (5) Mark read all the articles in the list you made in step 1.
  (6) Put the cursor back where it was when you started Mr. Toad's Wild
      Ride.

and when you uncollapse a thread you get all the articles in that thread
including read parents & children.

Steps 1, 2, 3 and 5 (basically, the whole macro) will not scale well.  It'll
run more slowly as the number of articles in the group increases.  Steps 1
and 5 will definately slow down the entire job.  Unless you're running slrn
on a very fast machine, you probably won't want to do this this way.

>   And pushing the envelope, maybe have "Mr Math" highlighted in a
> different colour to indicate that the article isn't read, rather than
> merely not having a "D" flag.

If unread articles can be colored, which I can't recall off the top of my
head, this might be possible.  It won't be possible to color this article
differently from any other article with the same status in that group
because slrn doesn't allow custom per-article coloring like that.

As I've said before: there are times when it's better to either learn the
slrn way or modify the source to get what you want done.

Here is a short list of things you might want to change to make your wishes
feasible via a macro (that you won't have to update with each new version of
slrn):

  * A hook to run anytime a thread is collapsed or uncollapsed (explicitly
    or implicitly).

  * A way to expunge a single article regardless of its read status.  This
    is something that a bunch of macros could use.  Maybe this could be a
    prefix argument to the expunge intrinsic?

  * Somehow let the user see thread displays that only show the unread
    articles even though info for some of the read articles in the thread
    are still in memory and ready to be shown at any time.

Personally, I don't think it's worth it.  I read news frequently enough that
I don't mind getting parent or child articles ad-hoc and most threads most
of the time aren't so deep I need lots of thread history.  On the other
hand, this project raises some things that would be nice to have: expunging
a single article would be handy sometimes and hooks are a more portable
approach to doing just about anything in slrn with macros.

I'm hitting the macro angle pretty hard because I enjoy the lack of
re-patching and re-updating I have to do to enjoy the features I've added to
my slrn.  For me most of the time, slrn's S-Lang API is all I need.

Good luck.

Technical Details
Message-ID: <slrn8fd839.em.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: <8cbgrq$31gm$2@news.tht.net> <8l7ic8.921.ln@ralf.dyndns.org> <8crneq$qai$1@news.tht.net> <slrn8f2u25.j33.bluemoon@ux6.cso.uiuc.edu> <8d5kr0$2tc7$1@news.tht.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8fd839.em.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: [slrn] How to keep read messages visible?
Date: Fri, 14 Apr 2000 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <8cbgrq$31gm$2@news.tht.net> <8l7ic8.921.ln@ralf.dyndns.org> <8crneq$qai$1@news.tht.net> <slrn8f2u25.j33.bluemoon@ux6.cso.uiuc.edu> <8d5kr0$2tc7$1@news.tht.net>
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: 610971075
Summary: Consider modifying slrn's source.
X-Complaints-To: abuse@uiuc.edu
X-Trace: vixen.cso.uiuc.edu 955686999 128.174.5.9 (Thu, 13 Apr 2000 23:36:39 CDT)
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.6.2 (HP-UX)
NNTP-Posting-Date: Thu, 13 Apr 2000 23:36:39 CDT
Newsgroups: news.software.readers