From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28248 Path: main.gmane.org!not-for-mail From: Paul Stevenson Newsgroups: gmane.emacs.gnus.general Subject: Re: Name washing Date: 14 Dec 1999 16:48:47 -0500 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 1035165130 28905 80.91.224.250 (21 Oct 2002 01:52:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:52:10 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA18839 for ; Tue, 14 Dec 1999 16:48:21 -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 PAB03307; Tue, 14 Dec 1999 15:47:49 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 14 Dec 1999 15:47:58 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id PAA11337 for ; Tue, 14 Dec 1999 15:47:48 -0600 (CST) Original-Received: from bethe.phy.ornl.gov (bethe.phy.ornl.gov [134.167.21.204]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA18827 for ; Tue, 14 Dec 1999 16:47:13 -0500 (EST) Original-Received: (from paul@localhost) by bethe.phy.ornl.gov (8.9.3/8.9.3) id QAA09416; Tue, 14 Dec 1999 16:48:48 -0500 Original-To: ding@gnus.org In-Reply-To: Paul Stevenson's message of "14 Dec 1999 15:51:31 -0500" Original-Lines: 33 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28248 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28248 Paul Stevenson writes: > Has anyone written, or does gnus already have some function to wash > names? > > [snip] okay, it was easier than I thought for just a very simple heuristic algorithm: (defun ps-wash-name (name) (if (stringp name) (if (string= name (car (split-string name "("))) (progn (if (string= name (car (split-string name "<"))) (car (split-string name "@")) (car (split-string name " <")))) (car (cdr (split-string name "(\\|)")))) "Fudged name")) then with (defun gnus-user-format-function-a (headers) (let ((name (aref headers 2))) (ps-wash-name name))) I can have (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20ua%]%) %s\n") and it does most of what I want. woo-hoo. Hooray for gnus-user-format-function