🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
14 messages
14 total messages Started by Jay Wed, 16 Jun 2021 17:01
slrn: Sort most recently active threads first?
#265030
Author: Jay
Date: Wed, 16 Jun 2021 17:01
3 lines
1273 bytes
Is there a way in slrn to sort the most "recently active" threads first? So if a
collapsed thread has been replied to today, I want it to show up high on the
list, even if the oldest unread message in the thread was posted weeks ago.
Re: slrn: Sort most recently active threads first?
#265029
Author: Tavis Ormandy
Date: Thu, 17 Jun 2021 15:30
30 lines
1752 bytes
On 2021-06-16, Jay wrote:
> Is there a way in slrn to sort the most "recently active" threads first? So if a
> collapsed thread has been replied to today, I want it to show up high on the
> list, even if the oldest unread message in the thread was posted weeks ago.

I think you're looking for `set sorting_method 9`.

Here is the full list of sorting methods, if you're interested:

           0  do not sort
           1  perform threading
           2  sort by subject
           3  thread, then sort by subject
           4  sort by score
           5  thread, then sort by score
           6  sort by score, then by subject
           7  thread, then sort by score and subject
           8  sort by date with most recent first
           9  thread, then sort by date with most recent first
          10  sort by date with most recent last
          11  thread, then sort by date with most recent last
          12  custom sorting

Tavis.


-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso
Re: slrn: Sort most recently active threads first?
#265031
Author: Jay
Date: Thu, 17 Jun 2021 15:35
29 lines
2368 bytes
On 2021-06-17, Tavis Ormandy <taviso@gmail.com> wrote:
> On 2021-06-16, Jay wrote:
>> Is there a way in slrn to sort the most "recently active" threads first? So
>> if a collapsed thread has been replied to today, I want it to show up high on
>> the list, even if the oldest unread message in the thread was posted weeks
>> ago.
>
> I think you're looking for `set sorting_method 9`.
>
> Here is the full list of sorting methods, if you're interested:
>
>            0  do not sort
>            1  perform threading
>            2  sort by subject
>            3  thread, then sort by subject
>            4  sort by score
>            5  thread, then sort by score
>            6  sort by score, then by subject
>            7  thread, then sort by score and subject
>            8  sort by date with most recent first
>            9  thread, then sort by date with most recent first
>           10  sort by date with most recent last
>           11  thread, then sort by date with most recent last
>           12  custom sorting
>
> Tavis.

Thanks. That doesn't quite work; it still sorts by the date of the highest
ancestor of a thread, not by the most recent message in any given thread.
Re: slrn: Sort most recently active threads first?
#265032
Author: Tavis Ormandy
Date: Thu, 17 Jun 2021 18:58
72 lines
2949 bytes
On 2021-06-17, Jay wrote:
> Thanks. That doesn't quite work; it still sorts by the date of the highest
> ancestor of a thread, not by the most recent message in any given thread.

Ah, I don't think that's possible.

There is no sorting hook, so you can't override how articles are
compared with macros, it's all hardcoded.

It would be nice if you could write an article_mode_hook that changes
the date, but you can't do anything like replace_article() then AFAIK.

Wait... LOL.. just as I was writing this reply saying it was impossible,
I realized how you could do it. It's a weird solution, so be prepared :-)

You can't alter articles in article_mode_hook, but you can adjust the
score. What if you temporarily set the score of each article to the
unixtime it was sent, sort it, then change it back? Slrn automatically
propogates the highest score to the thread, then you can sort by score before
reapplying the old scores.

Believe it or not, I think this works!

Try the macro below.

Tavis.

define score_child_date ()
{
    variable score = Assoc_Type[Int_Type, 0];
    variable flags = Assoc_Type[Int_Type, 0];
    variable date;
    variable meth;
    variable mid;

    uncollapse_threads();
    header_bob();

    do {
        date = extract_article_header("Date");
        mid  = extract_article_header("Message-ID");
        score[mid] = get_header_score();
        flags[mid] = get_header_flags();
        set_header_score(datestring_to_unixtime(date));
    } while (header_down(1) == 1);

    meth = get_variable_value("sorting_method");
    set_integer_variable("sorting_method", 5);
    sort_by_sorting_method();
    uncollapse_threads();

    set_integer_variable("sorting_method", meth);

    header_bob();

    do {
        mid = extract_article_header("Message-ID");
        set_header_score(score[mid]);
        set_header_flags(flags[mid]);
    } while (header_down(1) == 1);

    header_bob();
    collapse_threads();
}

() = register_hook("article_mode_startup_hook", "score_child_date");


-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso
Re: slrn: Sort most recently active threads first?
#265035
Author: Tavis Ormandy
Date: Thu, 17 Jun 2021 23:19
68 lines
2778 bytes
On 2021-06-17, Tavis Ormandy wrote:
> On 2021-06-17, Jay wrote:
>> Thanks. That doesn't quite work; it still sorts by the date of the highest
>> ancestor of a thread, not by the most recent message in any given thread.
>
> You can't alter articles in article_mode_hook, but you can adjust the
> score. What if you temporarily set the score of each article to the
> unixtime it was sent, sort it, then change it back?

I made some improvements:

    - Using UNIX time works but doesn't handle timezones. A better idea
      is to make slrn sort it then reuse whatever index it assigns the message.
    - It turns out sorting updates the flags displayed, so they were out
      of sync.

I've been using it today, I kinda like it.

I think you just need this in your .slrnrc:

interpret "util.sl"
interpret "/path/to/this/macro.sl"

Then save the following macro somewhere.

define score_child_date ()
{
    variable score = Assoc_Type[Int_Type, 0];
    variable flags = Assoc_Type[Int_Type, 0];
    variable mid;
    variable num = 0;

    set_integer_variable("sorting_method", 10);
    sort_by_sorting_method();

    header_bob();

    do {
        mid = extract_article_header("Message-ID");
        score[mid] = get_header_score();
        flags[mid] = get_header_flags();
        set_header_score(num);
        set_header_flags(flags[mid]);
        num = num + 1;
    } while (header_down(1) == 1);

    set_integer_variable("sorting_method", 5);
    sort_by_sorting_method();
    uncollapse_threads();

    header_bob();

    do {
        mid = extract_article_header("Message-ID");
        set_header_score(score[mid]);
        set_header_flags(flags[mid]);
    } while (header_down(1) == 1);

    header_bob();
    collapse_threads();
}

() = register_hook("article_mode_startup_hook", "score_child_date");

-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso
Re: slrn: Sort most recently active threads first?
#265034
Author: Bolloy Benders Family
Date: Fri, 18 Jun 2021 03:25
31 lines
1695 bytes
On Thu, 17 Jun 2021 10:35:28 -0500, Jay <jay@jay.xyz> wrote:

>>            S  sort by date with most recent last
>
>Thanks. That doesn't quite work; it still sorts by the date of the highest
>ancestor of a thread, not by the most recent message in any given thread.

This will do what you want. This won't thread posts.

Enter the newsgroup then press the "escape" key then "s" key and then
the "A" key.

ESC -> s -> A

If you want the newsgroup subject list sorted so that the latest date
is displayed at the top of the subject list:

ESC -> s -> 8

-- 

          )" .
         /    \      (\-./
        /     |    _/ o. \
       |      | .-"      y)-
       |      |/       _/ \
       \     /j   _".\(@) 
        \   ( |    `.''  )         
         \  _`-     |   /
           "  `-._  <_ (
                  `-.,),)
Re: slrn: Sort most recently active threads first?
#265033
Author: Tavis Ormandy
Date: Fri, 18 Jun 2021 04:12
29 lines
1589 bytes
On 2021-06-18, Bolloy Benders Family wrote:
> On Thu, 17 Jun 2021 10:35:28 -0500, Jay <jay@jay.xyz> wrote:
>
>>>            S  sort by date with most recent last
>>
>>Thanks. That doesn't quite work; it still sorts by the date of the highest
>>ancestor of a thread, not by the most recent message in any given thread.
>
> This will do what you want. This won't thread posts.
>

I think the question is how to sort threads by most recent activity.

e.g.

Thread A [1st Jan]
    - Re: Thread A [2nd Jan]
Thread B [2nd Jan]
    - Re: Thread B [3rd Jan]

Thread B should come first, because it has more recent activity. I think
a macro is necessary.

Tavis.

-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso
Re: slrn: Sort most recently active threads first?
#265036
Author: Jay
Date: Fri, 18 Jun 2021 13:43
21 lines
2111 bytes
On 2021-06-17, Tavis Ormandy <taviso@gmail.com> wrote:
> On 2021-06-17, Tavis Ormandy wrote:
>> On 2021-06-17, Jay wrote:
>>> Thanks. That doesn't quite work; it still sorts by the date of the highest
>>> ancestor of a thread, not by the most recent message in any given thread.
>>
>> You can't alter articles in article_mode_hook, but you can adjust the
>> score. What if you temporarily set the score of each article to the
>> unixtime it was sent, sort it, then change it back?
>
> I made some improvements:
>
>     - Using UNIX time works but doesn't handle timezones. A better idea
>       is to make slrn sort it then reuse whatever index it assigns the
>       message.
>     - It turns out sorting updates the flags displayed, so they were out
>       of sync.
>
> I've been using it today, I kinda like it.

Thanks!
Re: slrn: Sort most recently active threads first?
#265037
Author: Lewis
Date: Sat, 26 Jun 2021 11:39
22 lines
1799 bytes
In message <ij23jfFhbdnU1@mid.individual.net> Tavis Ormandy <taviso@gmail.com> wrote:
> I made some improvements:

>     - Using UNIX time works but doesn't handle timezones. A better idea
>       is to make slrn sort it then reuse whatever index it assigns the message.
>     - It turns out sorting updates the flags displayed, so they were out
>       of sync.

> I've been using it today, I kinda like it.

> I think you just need this in your .slrnrc:

> interpret "util.sl"
> interpret "/path/to/this/macro.sl"

> Then save the following macro somewhere.

Once this is done, does the macro just run when a group is loaded? I
don't see what it is doing when I load a group.

-- 
With the exception of the wit and wisdom of Calvin and Hobbes, not much lasts forever.
Re: slrn: Sort most recently active threads first?
#265039
Author: Lewis
Date: Sat, 26 Jun 2021 11:44
30 lines
2139 bytes
In message <slrnsde4f2.1pp7.g.kreme@m1mini.local> Lewis <g.kreme@kreme.dont-email.me> wrote:
> In message <ij23jfFhbdnU1@mid.individual.net> Tavis Ormandy <taviso@gmail.com> wrote:
>> I made some improvements:

>>     - Using UNIX time works but doesn't handle timezones. A better idea
>>       is to make slrn sort it then reuse whatever index it assigns the message.
>>     - It turns out sorting updates the flags displayed, so they were out
>>       of sync.

>> I've been using it today, I kinda like it.

>> I think you just need this in your .slrnrc:

>> interpret "util.sl"
>> interpret "/path/to/this/macro.sl"

>> Then save the following macro somewhere.

> Once this is done, does the macro just run when a group is loaded? I
> don't see what it is doing when I load a group.

This is what a group looks like when loading the macro:

https://imgur.com/9AVgqKJ


-- 
The Steve is seen, rightly or wrongly, as the visionary, the leader,
	the savant. Bill is the Boswell to The Steve's Johnson, but
	lacking Boswell's wit, charm, and dynamic personality.
Re: slrn: Sort most recently active threads first?
#265069
Author: Lis Khittan
Date: Mon, 02 Aug 2021 14:50
1 lines
908 bytes
Thanks so much Tavis. I am looking for a solution to this for years.
Re: slrn: Sort most recently active threads first?
#267278
Author: Unknown
Date: Sun, 05 May 2024 17:53
10 lines
1170 bytes
On 2021-06-16, Jay <jay@jay.xyz> wrote:
> Is there a way in slrn to sort the most "recently active" threads first? So if a
> collapsed thread has been replied to today, I want it to show up high on the
> list, even if the oldest unread message in the thread was posted weeks ago.

Try adding the following to your '.slrnrc' file.

set custom_sort_by_threads 1
set custom_sort_order "Highscore,Date|date"
set sorting_method 12
Re: slrn: Sort most recently active threads first?
#267277
Author: Unknown
Date: Sun, 05 May 2024 17:59
11 lines
1210 bytes
On 2021-06-16, Jay <jay@jay.xyz> wrote:
> Is there a way in slrn to sort the most "recently active" threads first? So if a
> collapsed thread has been replied to today, I want it to show up high on the
> list, even if the oldest unread message in the thread was posted weeks ago.

Try adding the following lines to your '.slrnrc' file.

set custom_sort_by_threads 1
set custom_sort_order "Highscore,Date|date"
set new_subject_breaks_threads 2
set sorting_method 12
Re: slrn: Sort most recently active threads first?
#267322
Author: Tavis Ormandy
Date: Sun, 26 May 2024 16:17
49 lines
2425 bytes
On 2024-05-05, Unknown wrote:
> On 2021-06-16, Jay <jay@jay.xyz> wrote:
>> Is there a way in slrn to sort the most "recently active" threads first? So if a
>> collapsed thread has been replied to today, I want it to show up high on the
>> list, even if the oldest unread message in the thread was posted weeks ago.
>
> Try adding the following lines to your '.slrnrc' file.
>
> set custom_sort_by_threads 1
> set custom_sort_order "Highscore,Date|date"
> set new_subject_breaks_threads 2
> set sorting_method 12

I keep getting replies about this haha :)

I assure you, this only controls how thread siblings are sorted, not
threads themselves.

For example, imagine a discussion like this:

Thread A [1st Jan]
    - Re: Thread A [4th Jan]
Thread B [2nd Jan]
    - Re: Thread B [3rd Jan]

I think your solution will put Thread B at the top, because the thread parent
is most recent. The question being asked is how to make Thread A first,
because that discsussion is more recently active.

I think the macro solution I posted is the only solution.

I keep getting off-list replies from people who think I'm wrong - but
I'm right! Take a look, I tried your setings on a real newsgroup to
demonstrate:

https://imgur.com/a/bO4hDDW

I hilighted two threads, one where the most recent reply is 25th May,
and one that was active on the 26th May... Notice how your settings
sort the more recently active thread later?

Now try it with the macro I posted, and see the correct sorting.

Tavis.

-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads