Thread View: news.software.readers
2 messages
2 total messages
Started by Alain Knaff
Tue, 30 Jan 1996 00:00
SLRN - various suggestions
Author: Alain Knaff
Date: Tue, 30 Jan 1996 00:00
Date: Tue, 30 Jan 1996 00:00
142 lines
4684 bytes
4684 bytes
I've made a patch to slrn 0.8.4 which adds a few handy features that
are present in tin, but aren't in slrn:
1. The function skip_to_prev_group skips to the previous groups (and
can be mapped to a key using .slrnrc)
2. The function fast_quit quits the newsreader from the article menu
without going through the group menu (as shift-Q does in tin).
3. The prompt before moving to a group via
skip_to_next_group/skip_to_prev_group has been removed.
The patch also fixes a small bug with Ultrix: When running slrn in an
rxvt (doesn't update utmp), it used to generate empty usernames,
instead of falling back on the USER environment variable. This is
because the Ultrix getlogin returns an empty string instead of a Null
pointer when no utmp entry exist.
I've some more suggestions (not covered in the patch):
- The output of the xover nntp command could be dumped to a file,
for later reuse. This would come in handy for high volume groups where
you leave many articles unread. (It can take some time to download the
overview from alt.folklore.urban over a slow link)
- The list of read articles in the .newsrc could be kept even for
unsubscribed groups. This is handy for those groups that you only
subscribe to from time to time.
Cheers,
Alain
diff -ur slrn/art.c slrn-ak/art.c
--- slrn/art.c Mon Dec 18 00:53:59 1995
+++ slrn-ak/art.c Tue Jan 30 11:48:39 1996
@@ -3797,6 +3797,19 @@
Art_Mode_Done = 2;
}
+static void skip_to_prev_group (void)
+{
+ art_quit ();
+ Art_Mode_Done = 3;
+}
+
+static void fast_quit (void)
+{
+ art_quit ();
+ Art_Mode_Done = 10;
+}
+
+
static void art_pagedn (void)
{
if (Article_Visible && (At_End_Of_Article == Current_Header))
@@ -4354,6 +4367,8 @@
A_KEY("get_children_headers", get_children_headers),
A_KEY("get_parent_header", get_parent_header),
A_KEY("skip_to_next_group", skip_to_next_group),
+ A_KEY("skip_to_prev_group", skip_to_prev_group),
+ A_KEY("fast_quit", fast_quit),
A_KEY("catchup_all", catch_up_all),
A_KEY("uncatchup_all", un_catch_up_all),
A_KEY("catchup", catch_up_to_here),
diff -ur slrn/group.c slrn-ak/group.c
--- slrn/group.c Mon Dec 18 00:53:53 1995
+++ slrn-ak/group.c Tue Jan 30 11:48:41 1996
@@ -1176,6 +1176,9 @@
slrn_digit_arg (Slrn_Group_Keymap);
}
+static void group_quit (void);
+
+
static void group_select_group (void)
{
int min, max, n;
@@ -1260,23 +1263,28 @@
Slrn_Winch_Function = NULL;
if (SLang_Error == 0)
- {
+ {
/* slrn_write_newsrc (); */
- if (ret == 2)
- {
- while (group_down_n (1))
+ if(ret == 10)
+ group_quit();
+ if (ret == 2 || ret == 3)
+ {
+ while ( (ret == 2 && group_down_n (1)) ||
+ (ret == 3 && group_up_n(1) ) )
{
if (Current_Group->unread == 0) continue;
-
+
while (1)
{
- slrn_message ("Next group: %s (%d unread)", Current_Group->name, Current_Group->unread);
+#if 0
+ slrn_message ("Next group: %s (%d unread)", Current_Group->name, Current_Group->unread);
slrn_smg_refresh ();
key = SLang_do_key (Slrn_Group_Keymap, (int (*)(void)) SLang_getkey);
if (key == NULL) f = NULL; else f = (void (*)(void)) key->f;
-
+#endif
+ goto top;
if (f == group_select_group) goto top;
else if ((f == group_down)
|| (f == group_up))
@@ -1295,6 +1303,7 @@
SLang_Error = SLKeyBoard_Quit = 0;
}
}
+
break;
}
}
diff -ur slrn/misc.c slrn-ak/misc.c
--- slrn/misc.c Mon Dec 18 00:53:53 1995
+++ slrn-ak/misc.c Tue Jan 30 11:50:18 1996
@@ -716,7 +716,7 @@
Slrn_User_Info.host[MAX_HOST_NAME_LEN - 1] = 0;
}
- if ((name = getlogin()) == NULL)
+ if ((name = getlogin()) == NULL || name[0] == '\0')
{
#ifdef VMS
if (((name = getenv("USER")) == NULL)
--
Linux - Where do you want to fly today ?
Windows 95 - Makes a grown man cry
Alain
Re: SLRN - various suggestions
Author: John E. Davis
Date: Fri, 02 Feb 1996 00:00
Date: Fri, 02 Feb 1996 00:00
39 lines
2035 bytes
2035 bytes
On 30 Jan 1996 14:58:34 GMT, Alain Knaff <knaff@ngulu.imag.fr>
wrote:
: I've made a patch to slrn 0.8.4 which adds a few handy features that
: are present in tin, but aren't in slrn:
: 1. The function skip_to_prev_group skips to the previous groups (and
: can be mapped to a key using .slrnrc)
: 2. The function fast_quit quits the newsreader from the article menu
: without going through the group menu (as shift-Q does in tin).
: 3. The prompt before moving to a group via
: skip_to_next_group/skip_to_prev_group has been removed.
For 0.8.6, this has been made optional via a line of the form
set prompt_next_group 0
I added this because the next group prompt was defeating the putpose of the
next-group mouse button.
: The patch also fixes a small bug with Ultrix: When running slrn in an
: rxvt (doesn't update utmp), it used to generate empty usernames,
: instead of falling back on the USER environment variable. This is
: because the Ultrix getlogin returns an empty string instead of a Null
: pointer when no utmp entry exist.
I did not know this. Thanks.
: - The list of read articles in the .newsrc could be kept even for
: unsubscribed groups. This is handy for those groups that you only
: subscribe to from time to time.
This feature is already present in 0.8.5.
0.8.6 will be coming out soon. I am waiting for the OS/2 port to be finished.
Thanks,
--John
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