🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #88064

[gnu.emacs.gnus] Re: Change display of article header line in gnus?

#88064
From: Per Abrahamsen
Date: Mon, 08 Aug 1994 04:25
45 lines
2556 bytes
I have been using this code for a year or so.   It gives you the real
name in the subject summary buffer, instead of the email address.  
I find it quite pleasant.  

Do you think it would be a good idea to include it in the gnus
distribution? 

Should it be default?

------- Start of forwarded message -------
Path: iesd.auc.dk!news.uni-c.dk!sunic!trane.uninett.no!eunet.no!nuug!EU.net!uunet!news.va.pubnix.com!news!djm
From: djm@va.pubnix.com (David J. MacKenzie)
Newsgroups: gnu.emacs.gnus
Subject: Re: Change display of article header line in gnus?
Date: 05 Aug 1994 16:37:21 GMT
Organization: UUNET Technologies
Lines: 20
Distribution: world
Message-ID: <DJM.94Aug5123721@catapult.va.pubnix.com>
References: <MARTINW.94Aug5161608@muppet60.cs.chalmers.se>
NNTP-Posting-Host: catapult.va.pubnix.com
In-reply-to: martinw@cs.chalmers.se's message of 5 Aug 1994 14:16:28 GMT

I saved this years ago.

;;;From: jwz@lucid.com (Jamie Zawinski)
;;;I prefer to see real names instead of net addresses in the Subject listing.
;;;Here is code that does that if possible.
(setq gnus-optional-headers 'my-gnus-lines-and-real-name)
(defun my-gnus-lines-and-real-name (header)
  (let* ((length 22)
	 (lines (nntp-header-lines header))
	 (from (nntp-header-from header))
	 (name (cond ((string-match "^[ \t]*\\([^<>]+\\)<\\([^>]+\\)>" from)
		      (substring from (match-beginning 1) (match-end 1)))
		     ((string-match "^\\([^()]+\\)([ \t]*\\(.+\\))" from)
		      (substring from (match-beginning 2) (match-end 2)))))
;;;	 (string (format "%3d:%s <%s>" lines (or name from) (if name from "")))
	 (string (format "%3d:%s" lines (or name from)))
	 (L (length string)))
    (cond ((> L length) (substring string 0 length))
	  ((< L length) (concat string (make-string (- length L) ? )))
	  (t string))))

------- End of forwarded message -------
Technical Details
Message-ID: <9408080418.AA10900@sunshine>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!iesd.auc.dk!amanda

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,d80126858cbab6ba,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-07 22:52:13 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!iesd.auc.dk!amanda
From: amanda@iesd.auc.dk (Per Abrahamsen)
Newsgroups: gnu.emacs.bug
Subject: [gnu.emacs.gnus] Re: Change display of article header line in gnus?
Date: 8 Aug 1994 00:25:19 -0400
Organization: GNUs Not Usenet
Lines: 46
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9408080418.AA10900@sunshine>