🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
10 messages
10 total messages Started by Sven Guckes Mon, 15 Nov 1999 00:00
slrn-0957 customization of the header in article mode
#54073
Author: Sven Guckes
Date: Mon, 15 Nov 1999 00:00
18 lines
972 bytes
How do you guys customzie the view of the header in article mode?
Examples, please.  Thankyou!

I want to see header like this:

	From: 
	Reply-To: 
	Newsgroups: 
	Subject: 
	Date: 
	Message-ID: 
	X-Mailer: 

Is there a way to emulate mutt's "ignore" and "unignore" with Slang?

Sven

Re: slrn-0957 customization of the header in article mode
#54065
Author: Dawn Owens-Nicholson
Date: Mon, 15 Nov 1999 00:00
26 lines
1628 bytes
Sven Guckes wrote:
> How do you guys customzie the view of the header in article mode?
> Examples, please.  Thankyou!

visible_headers specifies a set of headers to display but there's no
guarantee they'll be displayed in the order you want (even if you specify
complete header names).  You'll need to use a macro that redraws the entire
article using the replace_article intrinsic.

> I want to see header like this: [...]

So, would a command like this work for you:

  order_headers (["From:","Reply-To:","Newsgroups:","Subject:",
                  "Date:","Message-ID:","X-Mailer:"]);

or were you thinking of something else?

> Is there a way to emulate mutt's "ignore" and "unignore" with Slang?

Sure.  As I understand it, both commands take "*" to mean "all headers".
'ignore' also takes partial header names (with an implied "*" at the end of
the partial header name).  'unignore' also takes full header names. Is there
something else to it?

Re: slrn-0957 customization of the header in article mode
#54124
Author: Desmond Coughlan
Date: Mon, 15 Nov 1999 00:00
33 lines
1923 bytes
Sven Guckes <guckes@math.fu-berlin.de> wrote: 

> How do you guys customzie the view of the header in article mode?
> Examples, please.  Thankyou!
> 
> I want to see header like this:
> 
> 	From: 
> 	Reply-To: 
> 	Newsgroups: 
> 	Subject: 
> 	Date: 
> 	Message-ID: 
> 	X-Mailer: 
> 
> Is there a way to emulate mutt's "ignore" and "unignore" with Slang?

There is a line in the .slrnrc that reads (on my system) like this:

% Headers to show when viewing articles.  This is a comma-separated
% list of strings that specify what headers to show.  Note that these 
% strings are not regular expressions.  However, one may use, e.g.,
% "X-" to match any header beginning with "X-".  Similarly, "F" will 
% match "From:" and "Followup".
visible_headers "From:,Organization:,Subject:,Newsgroups:,Date:\
,Followup-To:,Reply-To:,NNTP-Posting-Host:,User-Agent:"

-- 
Desmond Coughlan		|Administrateur Syst�me
desmond@coughlan.net		|UNIX, Linux, NT
http://212.198.64.228/

[slrn] visible_headers (Re: slrn-0957 customization of the header in article mode)
#54146
Author: Sven Guckes
Date: Tue, 16 Nov 1999 00:00
24 lines
1687 bytes
* Desmond Coughlan <desmond@tortue.coughlan.net>:
> There is a line in the .slrnrc that reads (on my system) like this:
> visible_headers "From:,Organization:,Subject:,Newsgroups:,Date:\
> ,Followup-To:,Reply-To:,NNTP-Posting-Host:,User-Agent:"

I was looking for that variable.  Thanks!  :-)
This is what I have in my slrnrc [*] now:

  visible_headers "From:,Organization:,Subject:,Newsgroups:,Date:,\
  Followup-To:,Reply-To:,User-Agent:,X-Mailer,X-Newsreader:,Message-ID:"

% Q: "Why did you chose these headers?"
% A:
% Message-ID: <Pine.WNT.4.20.9. ...>               (sent from pine!)
% Organization: T-Online                           (aarrgghh!)
% X-Mailer: Mozilla 4.6 [de] (Win95; U)            (kill kill kill)
% X-Newsreader: ...                                (example follows)
% User-Agent: slrn/0.9.5.7 (UNIX)                  (YES! :-)

Have fun, folks!

Sven

Re: [slrn] visible_headers (Re: slrn-0957 customization of the header in article mode)
#54188
Author: Desmond Coughlan
Date: Tue, 16 Nov 1999 00:00
28 lines
1773 bytes
Sven Guckes <guckes@math.fu-berlin.de> wrote: 

> > There is a line in the .slrnrc that reads (on my system) like this:
> > visible_headers "From:,Organization:,Subject:,Newsgroups:,Date:\
> > ,Followup-To:,Reply-To:,NNTP-Posting-Host:,User-Agent:"

> I was looking for that variable.  Thanks!  :-)

You're welcome.  :-)   

By the way, although it's a different thread, I'm typing this in vi.  If
I use vim, the delete and backspace keys don't work, and the arrow keys
insert newlines and numbers.

Probably best to answer in the original thread ...  :-)

[snip]

> Have fun, folks!

As always ...   >:-O

-- 
Desmond Coughlan		|Administrateur Syst�me
desmond@coughlan.net		|UNIX, Linux, NT
http://212.198.64.228/

[slrn] article header - "ignore" and "unignore" a la mutt
#54195
Author: Sven Guckes
Date: Tue, 16 Nov 1999 00:00
68 lines
3106 bytes
* Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu>:
> > How do you guys customzie the view of the header in article mode?
> visible_headers specifies a set of headers to display..

OK, got that one now - thanks!  :-)

> ..but there's no guarantee they'll be displayed in the order you want
> (even if you specify complete header names).  You'll need to use a macro
> that redraws the entire article using the replace_article intrinsic.

Sounds complicated..

> So, would a command like this work for you:
>   order_headers (["From:","Reply-To:","Newsgroups:","Subject:",
>                   "Date:","Message-ID:","X-Mailer:"]);

Now, that would be GREAT!  gimme gimme gimme!  :-)

> > Is there a way to emulate mutt's "ignore" and "unignore" with Slang?
> Sure.  As I understand it, both commands take "*" to mean "all headers".
> 'ignore' also takes partial header names (with an implied "*" at the end
> of the partial header name).  'unignore' also takes full header names.
> Is there something else to it?

I think that's about it.
I'll append my mutt's "[un]ignore" settings
so you can see what exactly I want to do with it.

Sven

===
## Ignore everything but the really important lines:
   ignore *
 # The most important lines:
   unignore from date subject to cc reply-to:
 #
 #          Sender:
   unignore sender:
 #
 # Priorities should be heeded - even if M$ Outlook calls it "importance"..
   unignore priority: importance:
 #
 # "Org-Lines" - can be fun to read:
   unignore organization organisation
 #
 # see the identification of the "user agent":
   unignore user-agent: x-agent: x-mailer: x-newsreader: x-mailing-list:
 # see the identification of the used editor:
   unignore x-editor
 #
 # recognize CCs from Usenet:
   unignore message-id: newsgroups: posted-to: x-also-posted-to:
 #
 # Darned Lotus identifies with "X-Lotus-FromDomain" :-(
   unignore x-lotus
 #
 # Recognize resent messages (usually lacking proper headers):
 # Example header lines:
 #   X-Resent-By: Global Message Exchange <forwarder@gmx.net>
 #   X-Resent-For: guckes@gmx.de
 #   X-Resent-To: guckes@math.fu-berlin.de
   unignore resent- x-resent
 #
 # WebTV is invading us!!!  Aiiiee!
   unignore x-webtv
===

Re: slrn-0957 customization of the header in article mode
#54231
Author: Sylvan Butler
Date: Wed, 17 Nov 1999 00:00
15 lines
1557 bytes
On 17 Nov 1999 10:56:17 GMT, John E. Davis <davis@space.mit.edu> wrote:
>I think that you can use a macro that rearranges the header lines via
>the functions `article_as_string' and `replace_article' article

Any idea or feel for the performance impact of this ?

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Re: slrn-0957 customization of the header in article mode
#54232
Author: Sven Guckes
Date: Wed, 17 Nov 1999 00:00
16 lines
1305 bytes
* John E. Davis <davis@space.mit.edu>:
> >I want to see header like this:
> >	From: Reply-To: Newsgroups: Subject:
> >	Date: Message-ID: X-Mailer: 
> I think that you can use a macro that rearranges the header lines via the
> functions `article_as_string' and `replace_article' article functions.
> The following code fragment illustrates the essentual ideas.  [...]
> You need slang 1.3.X for this.

Well, has anyone done this yet?
Preferably in a way which takes
the order from visible_headers?

Sven  [reinvent wheel? no thanks.]

Re: slrn-0957 customization of the header in article mode
#54234
Author: John E. Davis
Date: Wed, 17 Nov 1999 00:00
54 lines
2033 bytes
On 15 Nov 1999 19:21:05 GMT, Sven Guckes <guckes@math.fu-berlin.de>
wrote:
>I want to see header like this:
>
>	From: 
>	Reply-To: 
>	Newsgroups: 
>	Subject: 
>	Date: 
>	Message-ID: 
>	X-Mailer: 

I think that you can use a macro that rearranges the header lines via
the functions `article_as_string' and `replace_article' article
functions.  The following code fragment illustrates the essentual
ideas.  You need slang 1.3.X for this.

define sort_article_header ()
{
   variable header, body, article;

   article = article_as_string ();

   % article = header\n\nbody
   variable i = is_substr (article, "\n\n");
   header = article[[0:i-1]];
   body = article[[i:]];
   
   % Now remove continuation lines from the header
   while (str_replace (header, "\n ", " "))
     header = ();
   while (str_replace (header, "\n\t", " "))
     header = ();

   % Now convert the header, which is currently a string, to an 
   % array of strings
   
   header = strtok (header, "\n");
   
   % Now manipulate the array of strings.  For example, here
   % I am going to sort them   
   i = array_sort (header);      % slang 1.3.x required!
   header = header[i];
   
   % Now join the header to the body
   
   header = strjoin (header, "\n");
   article = strcat (header, "\n", body);
   
   % Now replace the selected article with this
   replace_article (article);
}

Re: slrn-0957 customization of the Posting headers
#54335
Author: Adam Bailey
Date: Fri, 19 Nov 1999 00:00
41 lines
1619 bytes
m@llika.moc (Viens) wrote:

> On 15 Nov 1999 19:21:05 GMT, guckes@math.fu-berlin.de (Sven
> Guckes) wrote:
>
>> How do you guys customzie the view of the header in article mode?
>> Examples, please.  Thankyou!
>> 
>> I want to see header like this:
>> 
>>      From: 
>>      Reply-To: 
>>      Newsgroups: 
>>      Subject: 
>>      Date: 
>>      Message-ID: 
>>      X-Mailer: 
>
> Something related: How/where to set post's custom headers:
>
>     X-Goofy-Maxims:
>     X-No-Archive:
>
> etc.?

The default .slrnrc is your fully-annotated friend.

%Custom headers to add to NEW posts
set custom_headers "Mail-Copies-To: nobody\n"

% Custom headers for followup/reply.  These can use format specifiers as
% in the 'followup' string variable.
set followup_custom_headers "Mail-Copies-To: nobody\n"


-- 
Adam Bailey    | Chicago, Illinois
adamb@lull.org | Finger/Web for PGP
adamkb@aol.com | http://www.lull.org/adam/

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