From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28275 Path: main.gmane.org!not-for-mail From: Toby Speight Newsgroups: gmane.emacs.gnus.general Subject: Re: Name washing Date: 15 Dec 1999 11:04:04 +0000 Organization: Citrix Systems (Cambridge) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165152 29030 80.91.224.250 (21 Oct 2002 01:52:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:52:32 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by mailhost.sclp.com (Postfix) with ESMTP id C91E6D051E for ; Fri, 17 Dec 1999 03:51:58 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.3/8.9.1) with ESMTP id CAB10576; Fri, 17 Dec 1999 02:51:34 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 17 Dec 1999 02:51:28 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id CAA14522 for ; Fri, 17 Dec 1999 02:51:17 -0600 (CST) Original-Received: from gatekeeper.ctxuk.citrix.com (gatekeeper.ctxuk.citrix.com [195.153.38.114]) by mailhost.sclp.com (Postfix) with ESMTP id 59FAED0521 for ; Fri, 17 Dec 1999 03:50:56 -0500 (EST) Original-Received: from sh.ctxuk.citrix.com (sh.ctxuk.citrix.com [10.30.224.4]) by gatekeeper.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id LAA15322 for ; Wed, 15 Dec 1999 11:04:06 GMT Original-Received: from hwav01.ctxuk.citrix.com (hwav01.ctxuk.citrix.com [10.30.224.26]) by sh.ctxuk.citrix.com (8.8.7/BSCF-1.7) with SMTP id LAA24636 for ; Wed, 15 Dec 1999 11:04:06 GMT Original-Received: from 10.30.224.23 by hwav01.ctxuk.citrix.com (InterScan E-Mail VirusWall NT); Wed, 15 Dec 1999 11:04:06 -0000 (GMT Standard Time) Original-Received: from lanber.cam.eu.citrix.com (LANBER [10.70.1.235]) by hwmail01.ctxuk.citrix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id Y2VZ4BJ8; Wed, 15 Dec 1999 11:04:05 -0000 Original-To: The Gnus Mailing List Original-Lines: 52 In-Reply-To: Paul Stevenson's message of "14 Dec 1999 15:51:31 -0500" X-Author-Info: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28275 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28275 Paul> Paul Stevenson 0> In article , Paul wrote: Paul> I have in mind turning things like "Lars Magne Ingebrigtsen Paul> " 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)