🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87798

(none)

#87798
From: news
Date: Wed, 24 Aug 1994 22:18
154 lines
6812 bytes
Newsgroups: gnu.emacs.bug
Path: news.demon.co.uk!piercarl
From: piercarl@sabi.demon.co.uk (Piercarlo Grandi)
Subject: Re: [gnu.emacs.gnus] Re: Change display of article header line in gnus?
In-Reply-To: interran@uluru.stanford.edu's message of 10 Aug 1994 20:27:52 -0400
Message-ID: <PIERCARL.94Aug24230016@sabi.sabi.demon.co.uk>
Sender: news@demon.co.uk (Usenet Administration)
Nntp-Posting-Host: sabi.demon.co.uk
Reply-To: piercarl@sabi.demon.co.uk (Piercarlo Grandi)
Organization: Home's where my rucksack's
Date: Wed, 24 Aug 1994 22:00:16 GMT

Distribution: world
FCC: /home/sabi/piercarl/News./1994./Posted.b

>>> On 10 Aug 1994 20:27:52 -0400, interran@uluru.stanford.edu (John
>>> Interrante) said:

John> On 8 Aug 1994 00:25:19 -0400, amanda@iesd.auc.dk (Per Abrahamsen)
John> said:

Per> I have been using this code for a year or so.  It gives you the
Per> real name in the subject summary buffer, instead of the email
Per> address.  I find it quite pleasant.

[ ... The Zawinsky gnus-fname.el ... ]

John> I've also been using a similar piece of code that I got from somebody
John> else.  It looks perhaps a little better written, so I'll include it
John> below for comparison.

[ ... the Danielsen gnus-fname.el ... ]

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

John> Yes.

Per> Should it be default?

John> Yes.

I agree too.

To round up this list, I have been using yet another, and in my opinion
it is sweeter than the Zawinsky (reported by Per) or the Danielsen
(reported by John) code.

;;; From jrs@world.std.com Thu Aug 27 15:59:25 1992
;;; From: jrs@world.std.com (Rick Sladkey)
;;; Newsgroups: gnu.emacs.gnus
;;; Subject: gnus-full-name.el for full names with GNUS
;;; Date: 25 Aug 92 01:43:03 GMT
;;; Organization: The Internet
;;; 
;;; I like to see the the "full-name" of authors of news articles.  I have
;;; heard about functions that do this but I could never find one so here
;;; is my incarnation.
;;; 
;;; I dislike clutter so unless the article is very long I don't display
;;; the number of lines.  I also switched the order of the name and lines
;;; subfields as this seems simpler and is less likely to chop off a name
;;; unnecessarily.  It uses two advertised variables to control the
;;; output.  One controls the length of the name/lines field and the other
;;; controls the minimum number of lines to bother displaying.
;;; 
;;; Here is a sample *Subject* buffer:
;;; 
;;;   7184: [Hongjiu Lu              ] Re: Diamond Speedstar 24  vs  Orchid Pro-D$
;;;   7186: [Linus Benedict Torva 398] Birthday (was Re: Uptime found.  Thanks to$
;;;   7196: [Theodore Ts'o        115] (Finally!)  New uploads on TSX-11.MIT.EDU
;;;   7205: [Zeyd M. Ben-Halim       ] Re: the nightmare that is curses :)
;;;   7211: [Linus Benedict Torvalds ] Linux v. 0.97 is out
;;; 
;;; Let me know if you like it.
;;; -----
;;; gnus-full-name.el - use full names instead of email addrs with GNUS
;;; Rick Sladkey <jrs@world.std.com>

(require 'gnus)
(provide 'gnus-fname)

(setq gnus-optional-headers 'gnus-optional-full-name-and-lines)

(defvar gnus-optional-header-length (length "Joseph Quincy Luser 1234")
  "Total length of optional header field.")

(defvar gnus-optional-long-article 100
  "Length in lines of article before length appears in optional header.")

(defun gnus-optional-full-name-and-lines (header)
  "Return a string like `FULL-NAME NNNN' from HEADER or just `FULL-NAME'
if article is shorter than gnus-optional-long-article"
  (let ((lines (nntp-header-lines header))
	(from (gnus-mail-extract-full-name (nntp-header-from header)))
	(length gnus-optional-header-length))
    (if (< lines gnus-optional-long-article)
	(substring (concat from (make-string length ? )) 0 length)
      (let ((lines-string (format " %d" lines)))
	(concat (substring (concat from (make-string length ? ))
			   0 (- length (length lines-string)))
		lines-string)))))

(defun gnus-mail-extract-full-name (address)
  "Extract the full-name portion of a mail-address without square brackets."
  (if (or (string-match "^[^\(]*(\\([^][]+\\))$" address)
	  (string-match "^\\([^][\<]+\\) *<.*>$" address))
      (substring address (match-beginning 1) (match-end 1))
    (mail-strip-quoted-names address)))

;;; --
;;; Rick Sladkey
;;; jrs@world.std.com
;;; 
;;; From jrs@world.std.com Thu Aug 27 15:59:30 1992
;;; From: jrs@world.std.com (Rick Sladkey)
;;; Newsgroups: gnu.emacs.gnus
;;; Subject: Re: gnus-full-name.el for full names with GNUS
;;; Date: 25 Aug 92 02:19:55 GMT
;;; Organization: The Internet
;;; In-Reply-To: jrs@world.std.com's message of Tue, 25 Aug 1992 01:43:03 GMT
;;; 
;;; >>>>>(Rick Sladkey) said:
;;; 
;;; Rick> I like to see the the "full-name" of authors of news articles.  I have
;;; Rick> heard about functions that do this but I could never find one so here
;;; Rick> is my incarnation.
;;; 
;;; Oops.  Last minute changes will get you every time.  Here is a minor
;;; fix.  Not really very important.   It just swaps a '+' and an '*'.
;;; 
;;; -----
;;; *** gnus-full-name.el~	Mon Aug 24 22:15:42 1992
;;; --- gnus-full-name.el	Mon Aug 24 22:15:58 1992
;;; ***************
;;; *** 25,31 ****
;;;   (defun gnus-mail-extract-full-name (address)
;;;     "Extract the full-name portion of a mail-address without square brackets."
;;;     (if (or (string-match "^[^\(]*(\\([^][]+\\))$" address)
;;; ! 	  (string-match "^\\([^][\<]*\\) *<.+>$" address))
;;;         (substring address (match-beginning 1) (match-end 1))
;;;       (mail-strip-quoted-names address)))
;;;   
;;; --- 25,31 ----
;;;   (defun gnus-mail-extract-full-name (address)
;;;     "Extract the full-name portion of a mail-address without square brackets."
;;;     (if (or (string-match "^[^\(]*(\\([^][]+\\))$" address)
;;; ! 	  (string-match "^\\([^][\<]+\\) *<.*>$" address))
;;;         (substring address (match-beginning 1) (match-end 1))
;;;       (mail-strip-quoted-names address)))
;;;   
;;; --
;;; Rick Sladkey
;;; jrs@world.std.com
Technical Details
Message-ID: <9408242305.aa12472@dispatch.demon.co.uk>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!dispatch.demon.co.uk!news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,aa0bd4ac9bdba184,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-24 18:13:44 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!dispatch.demon.co.uk!news
From: news@dispatch.demon.co.uk
Newsgroups: gnu.emacs.bug
Subject: (none)
Date: 24 Aug 1994 18:18:28 -0400
Organization: GNUs Not Usenet
Lines: 155
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9408242305.aa12472@dispatch.demon.co.uk>