🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
18 messages
18 total messages Started by Matt Thu, 17 Sep 2009 03:16
Sort newsgroups in slrn?
#235515
Author: Matt
Date: Thu, 17 Sep 2009 03:16
11 lines
1632 bytes
Must be a silly question but I didn't see it in slrn's help menu: I
subscribed to a bunch of alt.* groups and now they are at the bottom of
my newsgroups list. Is there a way to sort them alphabetically?

I did find the 'm' command (default binding) to move a group individually
up or down the list, but this will take a while for all the newsgroups.

Thanks,

-- 
Matt
Re: Sort newsgroups in slrn?
#235514
Author: andrew
Date: Thu, 17 Sep 2009 04:32
18 lines
1687 bytes
On 2009-09-17, Matt <matt7846@yahoo.com.invalid> wrote:

> Must be a silly question but I didn't see it in slrn's help menu: I
> subscribed to a bunch of alt.* groups and now they are at the bottom of
> my newsgroups list. Is there a way to sort them alphabetically?

The FAQs have a brief mention of this:

3.8 How can I sort the list of newsgroups? 
http://slrn.sourceforge.net/docs/slrn-FAQ-3.html#ss3.8

although I see that the most primitive way to do this has not been
mentioned which is simply to use the 'sort' command on the .jnewsrc
file. Not sure if PJR would be interested in adding that one in?

Andrew
-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235519
Author: invalid
Date: Thu, 17 Sep 2009 07:50
24 lines
1901 bytes
On 2009-09-17, andrew <andrew@skamandros.invalid> wrote:
> On 2009-09-17, Matt <matt7846@yahoo.com.invalid> wrote:
>
>> Must be a silly question but I didn't see it in slrn's help menu: I
>> subscribed to a bunch of alt.* groups and now they are at the bottom of
>> my newsgroups list. Is there a way to sort them alphabetically?
>
> The FAQs have a brief mention of this:
>
> 3.8 How can I sort the list of newsgroups? 
> http://slrn.sourceforge.net/docs/slrn-FAQ-3.html#ss3.8
>
> although I see that the most primitive way to do this has not been
> mentioned which is simply to use the 'sort' command on the .jnewsrc
> file. Not sure if PJR would be interested in adding that one in?
>
> Andrew

That's what I do periodically. Edit the file in emacs, ctl-x h to select all
and then alt-x sort-lines will sort the file. ctl-x s to save and your done.

It would a nice feature for slrn to sort upon command or optionally sort
whenever it detects new newsgroups added. I personally would prefer the
latter as a default.
Re: Sort newsgroups in slrn?
#235517
Author: andrew
Date: Thu, 17 Sep 2009 10:34
14 lines
1839 bytes
On 2009-09-17, invalid@domain.invalid <invalid@domain.invalid> wrote:

> It would a nice feature for slrn to sort upon command or optionally
> sort whenever it detects new newsgroups added. I personally would
> prefer the latter as a default.

I cannot tell a lie, I was not actually aware that groups could be moved
with the 'm' key :-). For the 14 groups I subscribe to this will be more
than sufficient but perhaps more functionality will be added when the
development train leaves the station again?

Andrew
-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235518
Author: Mike Yetto
Date: Thu, 17 Sep 2009 12:41
33 lines
3109 bytes
Bada bing andrew <andrew@skamandros.invalid> bada bang:
> On 2009-09-17, invalid@domain.invalid <invalid@domain.invalid> wrote:
>
>> It would a nice feature for slrn to sort upon command or optionally
>> sort whenever it detects new newsgroups added. I personally would
>> prefer the latter as a default.
>
> I cannot tell a lie, I was not actually aware that groups could be moved
> with the 'm' key :-). For the 14 groups I subscribe to this will be more
> than sufficient but perhaps more functionality will be added when the
> development train leaves the station again?
>
 
I don't mean to rain on anyone's parade, but I'd rather see any
group sorting as being totally optional with the default of
leaving it alone.

I wrote a simple bash script that first creates a backup of the
file then pulls all of the subscribed groups from this backup to
a new newsrc without changing the existing order.  It then
extracts the unsubscribed groups that are in the Big 8 plus a few
others (eternal-september, grc, etc) and sorts them before
appending to the new newsrc file.

The result is a smaller newsrc file with my subscribed groups in
my manually set order followed by a selected list of unsubscribed
groups sorted alphabetically.  (sorry Andrew, there are no Greek
language groups)

Mike "no Klingon either" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: Sort newsgroups in slrn?
#235522
Author: John E. Davis
Date: Thu, 17 Sep 2009 14:57
91 lines
3725 bytes
On Thu, 17 Sep 2009 20:34:14 +1000, andrew <andrew@skamandros.invalid>
wrote:
> I cannot tell a lie, I was not actually aware that groups could be moved
> with the 'm' key :-). For the 14 groups I subscribe to this will be more
> than sufficient but perhaps more functionality will be added when the
> development train leaves the station again?

It is unclear to me that additional functionality is required.  For
example, I threw this together in about 20 minutes.   The public
function, "group_sort", could be called from a startup hook.  The
example below binds it to a key.  --John

#v+
private define sort_groups_alphabetically ()
{
   variable groups = get_group_order ();
   groups = groups [array_sort(groups)];
   set_group_order (groups);
}

private variable Big8_Groups = 
  ["alt", "comp", "misc", "news", "rec", "sci", "soc", "talk"];

private define slice_groups (hierarchies)
{
   variable
     num_hierarchies = length(hierarchies),
     groups = get_group_order (),
     new_groups = String_Type[length(groups)],
     hierarchy_groups = Array_Type[num_hierarchies+1];
   
   groups = groups[array_sort(groups)];
   variable i, j, k;
   hierarchies = hierarchies + ".";
   _for i (0, num_hierarchies-1, 1)
     {
	variable 
	  hierarchy = hierarchies[i],
	  cmp = array_map (Int_Type, &strncmp, hierarchy, 
			   groups, strlen(hierarchy));

	j = where (cmp, &k);
	hierarchy_groups[i] = groups[k];
	groups = groups[j];
     }
   hierarchy_groups[-1] = groups;
   return hierarchy_groups;
}

private define sort_groups_big8_first ()
{
   variable 
     hierarchy_groups = slice_groups (Big8_Groups),
     groups = String_Type[0], i;
   
   _for i (0, length(hierarchy_groups)-1, 1)
     groups = [groups, hierarchy_groups[i]];
   
   set_group_order (groups);
}

private define sort_groups_big8_last ()
{
   variable 
     hierarchy_groups = slice_groups (Big8_Groups),
     groups, i;

   groups = hierarchy_groups[-1];
   _for i (0, length(hierarchy_groups)-2, 1)
     groups = [groups, hierarchy_groups[i]];

   set_group_order (groups);
}

define group_sort ()
{
   if (0 == is_group_mode ())
     throw UsageError, "group_sort is available only in group mode";

   switch (get_select_box_response ("Sort Groups",
				    "Alphabetically",
				    "Big 8 first",
				    "Big 8 last",
				    3))
     { case 0: sort_groups_alphabetically (); }
     { case 1: sort_groups_big8_first (); }
     { case 2: sort_groups_big8_last (); }
}

definekey ("group_sort", "\es", "group");
#v-
Re: Sort newsgroups in slrn?
#235538
Author: Moe Trin
Date: Thu, 17 Sep 2009 19:50
34 lines
2819 bytes
On Thu, 17 Sep 2009, in the Usenet newsgroup news.software.readers, in article
<20090917203157.363@skamandros.andrews-corner.org>, andrew wrote:

>invalid@domain.invalid <invalid@domain.invalid> wrote:

>> It would a nice feature for slrn to sort upon command or optionally
>> sort whenever it detects new newsgroups added. I personally would
>> prefer the latter as a default.

09/16/2009 07:01:05 Checking for new groups.
09/16/2009 07:01:14 1727 new groups found.

I don't automatically subscribe to new groups (and in this case, none
were of interest) but prefer the new groups I subscribe to to be in a
separate series, so I can easily remove them if I find them
uninteresting.  Yes, I can un-subscribe, and then pipe the newsgroup
list through a 'grep -v '\!$' to remove them (which is what I did
yesterday with 1700+ new groups).

>I cannot tell a lie, I was not actually aware that groups could be
>moved with the 'm' key :-). For the 14 groups I subscribe to this
>will be more than sufficient

[compton ~]$ wc -l .jnewsrc
79
[compton ~]$ 

Many of the groups are old favorites that I've been following since
the early 1990s. I read the 'security' and other critical groups
first, then the general and networking groups, then finish up with
the recreational groups.  Thus, the alphabetical sequence isn't the
order I'd be interested in.

        Old guy
Re: Sort newsgroups in slrn?
#235553
Author: andrew
Date: Thu, 17 Sep 2009 22:42
24 lines
2048 bytes
On 2009-09-17, John E. Davis <jed@jedsoft.org> wrote:
> On Thu, 17 Sep 2009 20:34:14 +1000, andrew <andrew@skamandros.invalid>
> wrote:

>> I cannot tell a lie, I was not actually aware that groups could be moved
>> with the 'm' key :-). For the 14 groups I subscribe to this will be more
>> than sufficient but perhaps more functionality will be added when the
>> development train leaves the station again?
>
> It is unclear to me that additional functionality is required.  For
> example, I threw this together in about 20 minutes.   

Indeed it appears not and I thank you yet again for your trouble John :).
I have taken a screenshot of your work in action so the OP can have a
look:

http://www.andrews-corner.org/usenet/group_sort.png

Thanks again!

Andrew

-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235586
Author: Matt
Date: Fri, 18 Sep 2009 03:19
17 lines
2206 bytes
On 2009-09-17, John E. Davis <jed@jedsoft.org> wrote:
> On Thu, 17 Sep 2009 20:34:14 +1000, andrew <andrew@skamandros.invalid>
> wrote:
>> I cannot tell a lie, I was not actually aware that groups could be moved
>> with the 'm' key :-). For the 14 groups I subscribe to this will be more
>> than sufficient but perhaps more functionality will be added when the
>> development train leaves the station again?
>
> It is unclear to me that additional functionality is required.  For
> example, I threw this together in about 20 minutes.   The public
> function, "group_sort", could be called from a startup hook.  The
> example below binds it to a key.  --John

Thank you!  Even a rube like me got it working in no time flat. And much
appreciation for your work on slrn. :)

Re: Sort newsgroups in slrn?
#235657
Author: andrew
Date: Sat, 19 Sep 2009 03:14
13 lines
1630 bytes
On 2009-09-18, Matt <matt7846@yahoo.com.invalid> wrote:

> Thank you!  Even a rube like me got it working in no time flat. And
> much appreciation for your work on slrn. :)

Looks like this macro can now be found on the slrn website as well:

http://slrn.sourceforge.net/macros.html#download

Andrew

-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235669
Author: Adam Funk
Date: Sat, 19 Sep 2009 19:56
25 lines
1969 bytes
On 2009-09-17, Matt wrote:

> Must be a silly question but I didn't see it in slrn's help menu: I
> subscribed to a bunch of alt.* groups and now they are at the bottom of
> my newsgroups list. Is there a way to sort them alphabetically?
>
> I did find the 'm' command (default binding) to move a group individually
> up or down the list, but this will take a while for all the newsgroups.

I have a ~/.slrn/group_sort.sl file that provides this (and a bit
more).  The header says:

% Copyright © 2001-2003 J.B. Nicholson-Owens
% Author: J.B. Nicholson-Owens <jbn@forestfield.org>
% Title: Group Sort
% Version: 2.20
% Last tested with: slrn 0.9.7.4pl2 & S-Lang 1.4.9

but I don't have the URL for it.


-- 
I worry that 10 or 15 years from now, [my daughter] will come to me
and say 'Daddy, where were you when they took freedom of the press
away from the Internet?'    [Mike Godwin, EFF http://www.eff.org/ ]
Re: Sort newsgroups in slrn?
#235670
Author: Christian Ebert
Date: Sat, 19 Sep 2009 21:02
22 lines
2139 bytes
* Adam Funk on Saturday, September 19, 2009:
> I have a ~/.slrn/group_sort.sl file that provides this (and a bit
> more).  The header says:
> 
> % Copyright © 2001-2003 J.B. Nicholson-Owens
> % Author: J.B. Nicholson-Owens <jbn@forestfield.org>
> % Title: Group Sort
> % Version: 2.20
> % Last tested with: slrn 0.9.7.4pl2 & S-Lang 1.4.9
> 
> but I don't have the URL for it.

http://forestfield.org/slrn/#group_sort

The comment in the distributed gsort.sl points to it.

c
-- 
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
                     Ein deutscher Western/A German Western

         --->> http://www.blacktrash.org/underdogma/ccc.php
Re: Sort newsgroups in slrn?
#235672
Author: andrew
Date: Sat, 19 Sep 2009 22:26
21 lines
1932 bytes
On 2009-09-19, Adam Funk <a24061@ducksburg.com> wrote:

> I have a ~/.slrn/group_sort.sl file that provides this (and a bit
> more).  The header says:
>
> % Copyright © 2001-2003 J.B. Nicholson-Owens
> % Author: J.B. Nicholson-Owens <jbn@forestfield.org>
> % Title: Group Sort
> % Version: 2.20
> % Last tested with: slrn 0.9.7.4pl2 & S-Lang 1.4.9

Oops.... I have christened JED's version group-sort.sl and thus
guaranteed confusion. Can anyone think of a better name for this one:

http://slrn.sourceforge.net/macros/group-sort.sl

as I suspect I will need to rename it.

Andrew
-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235677
Author: andrew
Date: Sun, 20 Sep 2009 05:24
17 lines
1645 bytes
On 2009-09-19, andrew <andrew@skamandros.invalid> wrote:

> Oops.... I have christened JED's version group-sort.sl and thus
> guaranteed confusion. Can anyone think of a better name for this one:
>
> http://slrn.sourceforge.net/macros/group-sort.sl
>
> as I suspect I will need to rename it.

Welcome to:

http://slrn.sourceforge.net/macros/gsort-plus.sl

Andrew

-- 
Do you think that's air you're breathing?
Re: Sort newsgroups in slrn?
#235722
Author: Adam Funk
Date: Tue, 22 Sep 2009 11:49
26 lines
1977 bytes
On 2009-09-19, Christian Ebert wrote:

> * Adam Funk on Saturday, September 19, 2009:
>> I have a ~/.slrn/group_sort.sl file that provides this (and a bit
>> more).  The header says:
>> 
>> % Copyright © 2001-2003 J.B. Nicholson-Owens
>> % Author: J.B. Nicholson-Owens <jbn@forestfield.org>
>> % Title: Group Sort
>> % Version: 2.20
>> % Last tested with: slrn 0.9.7.4pl2 & S-Lang 1.4.9
>> 
>> but I don't have the URL for it.
>
> http://forestfield.org/slrn/#group_sort
>
> The comment in the distributed gsort.sl points to it.

So it does!  (That's probably how I found it.)


-- 
Taken on the whole however this is a fine disc and a good example of
the current pop scene attempting to break out of its vulgarisms and
sometimes downright obscene derivative hogwash.
                                     (Julian Stone-Mason B.A., 1972)
Re: Sort newsgroups in slrn?
#235721
Author: Adam Funk
Date: Tue, 22 Sep 2009 11:49
20 lines
1902 bytes
On 2009-09-17, Moe Trin wrote:

> I don't automatically subscribe to new groups (and in this case, none
> were of interest) but prefer the new groups I subscribe to to be in a
> separate series, so I can easily remove them if I find them
> uninteresting. 

Is there any way to get slrn to put the new groups at the end of the
list at start-up, rather than at the beginning?  

I have "set unsubscribe_new_groups 1" in ~/.slrnrc, but I quite often
hit CR right after launching slrn, only to discover that I have just
subscribed to yet another unwanted group that leafnode will start
downloading for a while if I don't remember to remove it manually from
"/var/spool/news/interesting.groups/".


-- 
Unix is a user-friendly operating system. It's just very choosy about
its friends.
Re: Sort newsgroups in slrn?
#235724
Author: Moe Trin
Date: Tue, 22 Sep 2009 19:51
53 lines
3795 bytes
On Tue, 22 Sep 2009, in the Usenet newsgroup news.software.readers, in article
<h7qmo6xbau.ln2@news.ducksburg.com>, Adam Funk wrote:

>Moe Trin wrote:

>> I don't automatically subscribe to new groups (and in this case,
>> none were of interest) but prefer the new groups I subscribe to to
>> be in a separate series, so I can easily remove them if I find
>> them uninteresting.

>Is there any way to get slrn to put the new groups at the end of the
>list at start-up, rather than at the beginning?

Good question - I usually glance at the display first, and on seeing
a large number of groups (lower right corner of footer) will probably
just quit immediately (which saves the news group file) and restart.
This results in the 'new' groups being listed below the groups I am
subscribed to.

>I have "set unsubscribe_new_groups 1" in ~/.slrnrc, but I quite often
>hit CR right after launching slrn, only to discover that I have just
>subscribed to yet another unwanted group that leafnode will start
>downloading for a while if I don't remember to remove it manually
>from "/var/spool/news/interesting.groups/".

I'm not using leafnode, so I'm not sure how the "new" groups make it
into the leafnode configuration file, but pressing the 'u' key while
the cursor is on the undesired group (in the 'group' menu) in slrn
will unsubscribe from that group.

I'll admit I don't run into this problem to often. New news groups
don't appear every day/week/month.  Looking at my logs (for the
giganews server) for 2009, I see

Jan 27, 2009     8 new groups found
Feb 10, 2009     2 new groups found
Mar 11, 2009     4 new groups found
Apr 21, 2009     5 new groups found
Apr 29, 2009     1 new group found
Jun  8, 2009    11 new groups found
Jun 24, 2009     4 new groups found
Aug  7, 2009     4 new groups found
Sep 16, 2009  1727 new groups found
Sep 22, 2009     4 new groups found

so it's _generally_ not a big deal. The weekly article posted to the
newsgroup 'news.lists.misc' (low activity group) with the subject
"Newsgroup changes (2009-09-13 to 2009-09-20)" (being the latest one
on my spool) lists changes to a list maintained at ISC (at
<ftp://ftp.isc.org/pub/usenet/CONFIG/>) also doesn't show much
activity.

        Old guy
Re: Sort newsgroups in slrn?
#235736
Author: Adam Funk
Date: Wed, 23 Sep 2009 10:39
25 lines
2149 bytes
On 2009-09-22, Moe Trin wrote:

><h7qmo6xbau.ln2@news.ducksburg.com>, Adam Funk wrote:

>>Is there any way to get slrn to put the new groups at the end of the
>>list at start-up, rather than at the beginning?
>
> Good question - I usually glance at the display first, and on seeing
> a large number of groups (lower right corner of footer) will probably
> just quit immediately (which saves the news group file) and restart.
> This results in the 'new' groups being listed below the groups I am
> subscribed to.
>
>>I have "set unsubscribe_new_groups 1" in ~/.slrnrc, but I quite often
>>hit CR right after launching slrn, 

I guess "usually glance at the display first" is one answer to my
problem!


-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
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