From: Toby Speight <Toby.Speight@streapadair.freeserve.co.uk>
Subject: Re: Name washing
Date: 15 Dec 1999 11:04:04 +0000 [thread overview]
Message-ID: <u1z8oea8r.fsf@lanber.cam.eu.citrix.com> (raw)
In-Reply-To: Paul Stevenson's message of "14 Dec 1999 15:51:31 -0500"
Paul> Paul Stevenson <URL:mailto:spaul@mail.phy.ornl.gov>
0> In article <m2puw9i6uk.lavish@bethe.phy.ornl.gov>, Paul wrote:
Paul> I have in mind turning things like "Lars Magne Ingebrigtsen
Paul> <larsi@gnus.org>" which one gets as %n in
Paul> gnus-summary-line-format into a shorter form such as "L M
Paul> Ingebrigtsen" so that people's full names can appear without
Paul> making the field too wide.
I have the following, to use the full names out of the BBDB, prefixed
with '*' (or a marker char from their notes). It works with the "To:"
hack if you get nnmail to re-write NOV entries for your own sent mail.
(defun bbdb-extract-address-components (from)
"Get the real name of FROM from the BBDB.\n
Meant for use as the value of gnus-extract-address-components."
(if (string-match "^=> " from)
(let ((components (bbdb-extract-address-components (substring from 3))))
(cons (concat "=>" (car components))
(cdr components)))
(let* ((mail-extr-ignore-single-names t)
(data (condition-case ()
(mail-extract-address-components from)
(error nil)))
(name (car data))
(net (car (cdr data)))
(net-canon (if (and net bbdb-canonicalize-net-hook)
(bbdb-canonicalize-address net)
net))
(record (and data (bbdb-search-simple name net-canon)))
string L)
(if (and record name (member (downcase name) (bbdb-record-net record)))
;; bogon!
(setq record nil))
(setq name (or (and bbdb/gnus-header-prefer-real-names
(or (and bbdb/gnus-header-show-bbdb-names record
(bbdb-record-name record))
name
(car (gnus-extract-address-components from))))
net))
(list (format "%s%s"
(if (and record bbdb/gnus-mark-known-posters)
(or (bbdb-record-getprop record bbdb-message-marker-field) "*")
" ")
(or name from))
net))))
(setq gnus-extract-address-components 'bbdb-extract-address-components)
prev parent reply other threads:[~1999-12-15 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-14 20:51 Paul Stevenson
1999-12-14 21:48 ` Paul Stevenson
1999-12-14 22:04 ` Paul Stevenson
[not found] ` <wtniu20lgtz.fsf@licia.dtek.chalmers.se>
1999-12-17 13:47 ` Paul Stevenson
1999-12-21 20:52 ` Kai Großjohann
1999-12-15 11:04 ` Toby Speight [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1z8oea8r.fsf@lanber.cam.eu.citrix.com \
--to=toby.speight@streapadair.freeserve.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).