From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65426 Path: news.gmane.org!not-for-mail From: jidanni@jidanni.org Newsgroups: gmane.emacs.gnus.general Subject: Re: How to strip names out of To: and CC: Date: Sun, 21 Oct 2007 03:30:30 +0800 Message-ID: <87hckl4m95.fsf@jidanni.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192908714 29657 80.91.229.12 (20 Oct 2007 19:31:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2007 19:31:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13927@lists.math.uh.edu Sat Oct 20 21:31:55 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IjK38-0004kF-Rb for ding-account@gmane.org; Sat, 20 Oct 2007 21:31:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IjK28-0000Ju-21; Sat, 20 Oct 2007 14:30:52 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IjK26-0000Jg-R6 for ding@lists.math.uh.edu; Sat, 20 Oct 2007 14:30:50 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IjK21-0000gA-AT for ding@lists.math.uh.edu; Sat, 20 Oct 2007 14:30:50 -0500 Original-Received: from lax-green-bigip-5.dreamhost.com ([208.113.200.5] helo=looneymail-a4.g.dreamhost.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IjK1u-0001gB-00 for ; Sat, 20 Oct 2007 21:30:38 +0200 Original-Received: from jidanni2 (122-127-32-128.dynamic.hinet.net [122.127.32.128]) by looneymail-a4.g.dreamhost.com (Postfix) with ESMTP id D36441260D5 for ; Sat, 20 Oct 2007 12:30:40 -0700 (PDT) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin (3.1.9 2007-02-13) analysis follows Bayesian score: 0.4226 Ham tokens: 0.000-2350--7847h-5s--0d--H*M:fsf, 0.000-2161--7217h-5s--0d--H*MI:fsf, 0.002-11--35h-0s--0d--insert, 0.004-5--15h-0s--0d--concepts, 0.013-2--4h-0s--0d--lisp Spam tokens: 0.964-3797--975h-43221s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.964-3797--975h-43221s--0d--H*RU:quimby.gnus.org, 0.958-1--0h-1s--0d--amass, 0.937-2928--1695h-41865s--0d--H*r:quimby.gnus.org, 0.933-2788--1834h-41855s--0d--H*r:3.35 Autolearn status: no 1.0 NO_REAL_NAME From: does not include a real name 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.4226] -0.2 AWL AWL: From: address is in the auto white-list List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65426 Archived-At: Well here's how far I got: (defun jidanni-message-to-cc-no-names () "Strip the names out of To: and Cc:, leaving just the addresses, for a more spartan style." (let (mapcar (lambda(X) ((X-content (mapcar (lambda(x)(cadr x)) (mail-extract-address-components x t)))) (message-fetch-field "X")) (message-goto-X)(message-delete-line);OR (message-remove-header X)? (insert (concat "X: " X-content "\n")) (list to cc)))) (add-hook 'message-header-setup-hook 'jidanni-message-to-cc-no-names) Of course it is just a jumble of Lisp Concepts in no special order that took several hours for me to amass. Or maybe I would be smarter to just hack the definition of mail-extract-address-components and gnus-extract-address-components to cause them to lose the names, but that would be like painting the traffic light green.