Thread View: news.software.readers
14 messages
14 total messages
Started by Remco van den Berg
Tue, 11 May 1999 00:00
view complete threads in slrn, how?
Author: Remco van den Berg
Date: Tue, 11 May 1999 00:00
Date: Tue, 11 May 1999 00:00
17 lines
1175 bytes
1175 bytes
Hi all, I'm a new slrn user and I'm missing an option I used to have in Netscape. OK, I'm definately not switching back but I really want this feature in slrn too: How can I view the complete thread when there are one or more new messages in the thread automatically? I think de key combinations "Esc-1-Esc-p" does this but I want to have this the default for all threads. Who can help me? -Remco
Re: view complete threads in slrn, how?
Author: John E. Davis
Date: Tue, 11 May 1999 00:00
Date: Tue, 11 May 1999 00:00
15 lines
1251 bytes
1251 bytes
On Tue, 11 May 1999 17:40:36 GMT, Remco van den Berg <rvdberg@jupiter.strijp.Ehv.nl> wrote: >I think de key combinations "Esc-1-Esc-p" does this but I want >to have this the default for all threads. Try this in your.slrnrc file: setkey group ".1 set_prefix_argument 13 ungetkey select_group" " " Then use SPACE to select the group to get all the articles. Use RETURN to get just the unread ones. --John
Re: view complete threads in slrn, how?
Author: John E. Davis
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
104 lines
3731 bytes
3731 bytes
On Wed, 12 May 1999 17:04:46 +0200, Remco van den Berg <Remco.vdBerg@ehv.sc.philips.com>
wrote:
>for i in "all unread headers"
>do
> complete_thread = calculate_all headers_in_thread( $i );
> for j in $complete_thread
> do
> show_header( $j );
> done
>done
[...]
>And after I've programmed such macro, how can I connect that to
>the article_mode_hook? (Yes, I printed out a pile of docs but I
>cannot find answers anyware... Perhaps I printed the wrong ones :)
You need to browse the slang documentation. Look on www.s-lang.org
for links to that. The following code uses a different algorithm that
does not require querying the server by message-id, which may be an
expensive operation. However, it does require that all the headers
for the group be downloaded. Use the SPACE key in group mode to get
this behavior, otherwise use RETURN to get the default slrn behavior.
This code requires slang 1.3.5. It is available from
ftp://space.mit.edu/pub/davis/slang/snapshots/
define thread_headers ()
{
variable s = get_variable_value ("sorting_method");
ungetkey ('1');
call ("toggle_sort");
return s;
}
define xpunge_read_threads ()
{
variable msgid_list, flags;
variable sort_method, msgid;
msgid_list = Assoc_Type[Int_Type];
% Get the message-ids of all unread headers
call ("header_bob");
do
{
flags = get_header_flags ();
if (0 == (flags & HEADER_READ))
msgid_list[extract_article_header ("Message-ID")] = flags;
}
while (header_down(1));
% Now thread and mark those with unread articles as unread
sort_method = thread_headers ();
foreach (msgid_list) using ("keys")
{
msgid = ();
() = locate_header_by_msgid (msgid, 0);
collapse_thread ();
call ("undelete");
}
set_integer_variable ("sorting_method", sort_method);
% Now kick out the ones that are still marked as read
call ("art_xpunge");
% There may be nothing left after this putting us back in group mode
if (is_group_mode ())
return;
call ("header_bob");
uncollapse_threads ();
do
{
msgid = extract_article_header ("Message-ID");
if (0 == assoc_key_exists (msgid_list, msgid))
set_header_flags (get_header_flags () | HEADER_READ);
}
while (header_down (1));
call ("header_bob");
}
static variable Delete_Read_Threads = 0;
define article_mode_hook ()
{
if (Delete_Read_Threads)
xpunge_read_threads ();
}
define my_enter_group_cmd ()
{
set_prefix_argument (1);
ungetkey ('\r');
Delete_Read_Threads = 1;
() = select_group ();
Delete_Read_Threads = 0;
}
definekey ("my_enter_group_cmd", " ", "group");
Re: view complete threads in slrn, how?
Author: Heikki Kantola
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
29 lines
2089 bytes
2089 bytes
Evan P. Herberg <herberg@frick.cs.und.edu> informed news.software.readers with the following: >On Wed, 12 May 1999 11:41:18 +0200, Remco van den Berg ><Remco.vdBerg@ehv.sc.philips.com> wrote: >>Sorry, but this doesn't do what I want. >> >>I ONLY want the threads which have 1 or more unread messages to be >>viewed. But I DO wanna see the already read old messages in that thread. >> >>So threads which only only exist of already read messages I don't wanna >>see. > >I wonder if you want to try trn to get what you want done? I used to >use trn -- and still feel that trn's method of showing the entire thread >tree in the upper right hand corner is the most elegant way of >representing a thread I've ever seen. Actually Trn isn't only program showing such treeview, there's at least X-newsreader Knews[1] and Emacs' Gnus[2] which also draw thread trees. [1] <URL:http://www.matematik.su.se/%7Ekjj/knews.html> [2] <URL:http://www.gnus.org/> -- Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI> L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta tunnilta.
Re: view complete threads in slrn, how?
Author: Dawn Owens-Nicholson
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
17 lines
1493 bytes
1493 bytes
Remco van den Berg wrote: > So threads which only only exist of already read messages I don't wanna > see. You know you'll miss (possibly a lot of) articles with this--articles that have no followups (a.k.a. single-article threads) marked read will be removed from the header list you use to tell slrn what you want to read. Someone else (in <slrn76o7c3.s58.bluemoon@ux6.cso.uiuc.edu>) had a similar request for an article_mode_hook() macro and it wasn't clear whether they knew how much news they'd miss because their request suggested an assumption that threads arrived at their site in the order in which they were posted. The referenced article can be found: http://search.deja.com/msgid.xp?MID=%3Cslrn76o7c3.s58.bluemoon@ux6.cso.uiuc.edu%3E
Re: view complete threads in slrn, how?
Author: John E. Davis
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
21 lines
1763 bytes
1763 bytes
On Wed, 12 May 1999 11:41:18 +0200, Remco van den Berg <Remco.vdBerg@ehv.sc.philips.com>
wrote:
>I ONLY want the threads which have 1 or more unread messages to be
>viewed. But I DO wanna see the already read old messages in that thread.
You will have to write a macro to do this and add the macro to an
article_mode_hook. The macro would run through the headers and use
code of the form
set_prefix_argument (1);
call ("get_parent_header");
I think the best way to implement this would be to loop through the
headers first to obtain the message-ids. Then for each of the
corresponding headers, execute the above code.
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307
Re: view complete threads in slrn, how?
Author: Evan P. Herberg
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
31 lines
2220 bytes
2220 bytes
On Wed, 12 May 1999 11:41:18 +0200, Remco van den Berg <Remco.vdBerg@ehv.sc.philips.com> wrote: >Sorry, but this doesn't do what I want. > >I ONLY want the threads which have 1 or more unread messages to be >viewed. But I DO wanna see the already read old messages in that thread. > >So threads which only only exist of already read messages I don't wanna >see. I wonder if you want to try trn to get what you want done? I used to use trn -- and still feel that trn's method of showing the entire thread tree in the upper right hand corner is the most elegant way of representing a thread I've ever seen. You can see at a glance which articles are unread and which are read while taking only a minimum of space away from the article display. I'd be using it primarily today if it weren't for the fact that trn (at least my version) doesn't support multiple news servers. As I use my native one, the icq one, and the microsoft one -- I ended up trying out gnus and slrn before settling on slrn as the news software I'm using most. Oh -- speaking of which ... Hey John, two quick questions: When writing a followup with slrn -- any option to allow for not including the original message with slrn? Also -- when decoding, any way to mark articles via a search parameter: Ex. All articles with *foo* in the subject get marked for decoding. No big deal as it doesn't take that long to just move down tagging things, but I do miss trn's /foo:e command. -- Evan P. Herberg E-Mail: herberg@cs.und.edu
Re: view complete threads in slrn, how?
Author: Thomas Schultz
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
14 lines
1460 bytes
1460 bytes
On 12 May 1999, John E. Davis <davis@space.mit.edu> wrote:
> () = locate_header_by_msgid (msgid, 0);
By the way - every time I try to use this function the way it is
described in the manual (and shown here), I get a stack underflow. The
error goes away if I leave out the "() = "-assignment. Is it possible
that locate_header_by_msgid isn't actually returning a value or is it
just me making some kind of stupid mistake?
--
Kind regards,
Thomas Schultz
Re: view complete threads in slrn, how?
Author: Remco van den Berg
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
35 lines
2216 bytes
2216 bytes
"John E. Davis" wrote:
>
> On Tue, 11 May 1999 17:40:36 GMT, Remco van den Berg <rvdberg@jupiter.strijp.Ehv.nl>
> wrote:
> >I think de key combinations "Esc-1-Esc-p" does this but I want
> >to have this the default for all threads.
>
> Try this in your.slrnrc file:
>
> setkey group ".1 set_prefix_argument 13 ungetkey select_group" " "
>
> Then use SPACE to select the group to get all the articles. Use
> RETURN to get just the unread ones.
>
> --John
Sorry, but this doesn't do what I want.
I ONLY want the threads which have 1 or more unread messages to be
viewed. But I DO wanna see the already read old messages in that thread.
So threads which only only exist of already read messages I don't wanna
see.
So.... who knows the sollution?
-Remco
--
----------------------------------------------------------------------------
Remco van den Berg Linux Certified Systems Engineer
Remco.vdBerg@ehv.sc.philips.com seri: rvdberg@nlsce1
----------------------------------------------------------------------------
Re: view complete threads in slrn, how?
Author: Remco van den Berg
Date: Wed, 12 May 1999 00:00
Date: Wed, 12 May 1999 00:00
47 lines
2800 bytes
2800 bytes
"John E. Davis" wrote:
>
> On Wed, 12 May 1999 11:41:18 +0200, Remco van den Berg <Remco.vdBerg@ehv.sc.philips.com>
> wrote:
> >I ONLY want the threads which have 1 or more unread messages to be
> >viewed. But I DO wanna see the already read old messages in that thread.
>
> You will have to write a macro to do this and add the macro to an
> article_mode_hook. The macro would run through the headers and use
> code of the form
>
> set_prefix_argument (1);
> call ("get_parent_header");
>
> I think the best way to implement this would be to loop through the
> headers first to obtain the message-ids. Then for each of the
> corresponding headers, execute the above code.
> --
> John E. Davis Center for Space Research/AXAF Science Center
> 617-258-8119 One Hampshire St., Building NE80-6019
> http://space.mit.edu/~davis Cambridge, MA 02139-4307
OK, this gets somewhat complicated if you're not familiar with slang and
slrn internals.
Is there somebody who can show me the way to program this?
It has to do something like this (????) :
for i in "all unread headers"
do
complete_thread = calculate_all headers_in_thread( $i );
for j in $complete_thread
do
show_header( $j );
done
done
Fine, and how to program this in slrn / slang ???
(I even don't know if the above program is functional OK...)
And after I've programmed such macro, how can I connect that to
the article_mode_hook? (Yes, I printed out a pile of docs but I
cannot find answers anyware... Perhaps I printed the wrong ones :)
-Remco
Re: view complete threads in slrn, how?
Author: John E. Davis
Date: Thu, 13 May 1999 00:00
Date: Thu, 13 May 1999 00:00
34 lines
2779 bytes
2779 bytes
On 12 May 1999 22:23:33 GMT, Thomas Schultz <tststs@gmx.de>
wrote:
>On 12 May 1999, John E. Davis <davis@space.mit.edu> wrote:
>
>> () = locate_header_by_msgid (msgid, 0);
>
>By the way - every time I try to use this function the way it is
>described in the manual (and shown here), I get a stack underflow. The
>error goes away if I leave out the "() = "-assignment. Is it possible
>that locate_header_by_msgid isn't actually returning a value or is it
>just me making some kind of stupid mistake?
That function was introduced in 0.9.5.5. Unfortunately, I improperly
interfaced it to the interpreter. It is one of the reasons that I am
going to release 0.9.5.6 this weekend. Here is the patch:
--- ../../release/slrn/src/interp.c Sun Apr 25 16:41:45 1999
+++ interp.c Fri Apr 30 00:02:05 1999
@@ -991,7 +991,7 @@
MAKE_INTRINSIC_IS("set_header_display_format", set_header_display_format, SLANG_VOID_TYPE),
MAKE_INTRINSIC_0("get_prefix_arg", get_prefix_arg, SLANG_INT_TYPE),
MAKE_INTRINSIC_0("reset_prefix_arg", reset_prefix_arg, SLANG_VOID_TYPE),
- MAKE_INTRINSIC_SI("locate_header_by_msgid", locate_header_by_msgid, SLANG_VOID_TYPE),
+ MAKE_INTRINSIC_SI("locate_header_by_msgid", locate_header_by_msgid, SLANG_INT_TYPE),
MAKE_INTRINSIC_0("article_as_string", article_as_string, SLANG_STRING_TYPE),
MAKE_INTRINSIC_S("call", slrn_call_command, SLANG_VOID_TYPE),
MAKE_INTRINSIC_0("collapse_thread", collapse_thread, SLANG_VOID_TYPE),
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307
Re: view complete threads in slrn, how?
Author: Remco van den Berg
Date: Thu, 13 May 1999 00:00
Date: Thu, 13 May 1999 00:00
51 lines
2931 bytes
2931 bytes
On 12 May 1999 19:56:03 GMT, John E. Davis wrote:
>On Wed, 12 May 1999 17:04:46 +0200, Remco van den Berg <Remco.vdBerg@ehv.sc.philips.com>
>wrote:
>>for i in "all unread headers"
>>do
>> complete_thread = calculate_all headers_in_thread( $i );
>> for j in $complete_thread
>> do
>> show_header( $j );
>> done
>>done
>[...]
>>And after I've programmed such macro, how can I connect that to
>>the article_mode_hook? (Yes, I printed out a pile of docs but I
>>cannot find answers anyware... Perhaps I printed the wrong ones :)
>
>You need to browse the slang documentation. Look on www.s-lang.org
>for links to that. The following code uses a different algorithm that
>does not require querying the server by message-id, which may be an
>expensive operation. However, it does require that all the headers
>for the group be downloaded. Use the SPACE key in group mode to get
>this behavior, otherwise use RETURN to get the default slrn behavior.
I understand. We're doing the oppisite: First read _all_ articles
and then throw away the threads which only exist of already read
articles. That way we don't have to query the server many times.
>This code requires slang 1.3.5. It is available from
>
> ftp://space.mit.edu/pub/davis/slang/snapshots/
OK, downloaded 1.3.5 and the documentation 1.4.
> <removed a lot of program lines>
As I read in another posting I'll have to wait for a new release
this weekend and then I'll try to implement this.
Perhaps a suggestion to put this feature default in slrn ?
Thanks for the help,
-Remco
--
----------------------------------------------------------------------------
Remco van den Berg Admin DSE http://www.dse.nl/
rvdberg@dse.nl Linux Certified Systems Engineer
----------------------------------------------------------------------------
Re: view complete threads in slrn, how?
Author: Remco van den Berg
Date: Thu, 13 May 1999 00:00
Date: Thu, 13 May 1999 00:00
21 lines
1816 bytes
1816 bytes
On 12 May 1999 18:32:58 GMT, Dawn Owens-Nicholson wrote:
>Remco van den Berg wrote:
>> So threads which only only exist of already read messages I don't wanna
>> see.
>
>You know you'll miss (possibly a lot of) articles with this--articles that
>have no followups (a.k.a. single-article threads) marked read will be
>removed from the header list you use to tell slrn what you want to read.
I don't understand. You're talking about a single-article thread which is
marked read; so I've read that single article. What do I miss then?
-Remco
--
----------------------------------------------------------------------------
Remco van den Berg Admin DSE http://www.dse.nl/
rvdberg@dse.nl Linux Certified Systems Engineer
----------------------------------------------------------------------------
Re: view complete threads in slrn, how?
Author: Thomas Schultz
Date: Thu, 13 May 1999 00:00
Date: Thu, 13 May 1999 00:00
48 lines
2938 bytes
2938 bytes
On 13 May 1999, John E. Davis <davis@space.mit.edu> wrote:
> That function was introduced in 0.9.5.5. Unfortunately, I improperly
> interfaced it to the interpreter. It is one of the reasons that I am
> going to release 0.9.5.6 this weekend. Here is the patch:
[...]
Thank you, now it works as described. By the way, I noticed that slrn
still does not MIME-encode the user's realname according to RFC 2045
when generating the "From:"-header line in postings. Here is a patch
written by Joachim Wieland <joe@mcknight.swin.de> (and slightly
changed by me so it can be applied to 0.9.5.5) that corrects this.
Maybe you could also include it in the new version of slrn:
--- ../../slrn.orig/src/post.c Sun Apr 25 22:41:43 1999
+++ post.c Fri May 14 00:48:47 1999
@@ -672,7 +672,8 @@
/* This function returns 1 if postponed, 0 upon sucess, -1 upon error */
int slrn_post_file (char *file, char *to, int is_postponed)
{
- char line[MAX_LINE_BUFLEN], *linep;
+ char line[MAX_LINE_BUFLEN]; /* also used for MIME encoding of the realname */
+ char *linep;
int len, header;
FILE *fp;
int rsp;
@@ -853,7 +854,16 @@
if (Slrn_User_Info.username != NULL)
Slrn_Post_Obj->po_printf ("Path: %s\n", Slrn_User_Info.username);
- Slrn_Post_Obj->po_printf ("From: %s\n", slrn_make_from_string ());
+ /* line is not used until now, so we can use it as a buffer */
+
+ strcpy(line, slrn_make_from_string ());
+
+#if SLRN_HAS_MIME
+ if (Slrn_Use_Mime)
+ slrn_mime_header_encode(line, sizeof(line));
+#endif
+
+ Slrn_Post_Obj->po_printf ("From: %s\n", line);
/* if (Slrn_User_Info.posting_host != NULL)
* Slrn_Post_Obj->po_printf ("X-Posting-Host: %s\n", Slrn_User_Info.posting_host); */
--
Kind regards,
Thomas Schultz
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