From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/43676 Path: quimby.gnus.org!not-for-mail From: Arne =?iso-8859-1?q?J=F8rgensen?= Newsgroups: gmane.emacs.gnus.general Subject: gnus-alter-header-function and mail-header-set-* Date: Wed, 27 Feb 2002 14:22:51 +0100 Organization: Department of Computer Science, University of Aarhus Message-ID: NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: quimby2.netfonds.no 1014816460 965 195.204.10.66 (27 Feb 2002 13:27:40 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 27 Feb 2002 13:27:40 GMT Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16g47O-0000FO-00; Wed, 27 Feb 2002 14:27:38 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16g434-0007TO-00; Wed, 27 Feb 2002 07:23:10 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 27 Feb 2002 07:23:11 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id HAA25235 for ; Wed, 27 Feb 2002 07:23:00 -0600 (CST) Original-Received: (qmail 19789 invoked by alias); 27 Feb 2002 13:22:54 -0000 Original-Received: (qmail 19784 invoked from network); 27 Feb 2002 13:22:54 -0000 Original-Received: from ingebrigtsen.no (HELO quimby2.netfonds.no) (195.204.10.66) by gnus.org with SMTP; 27 Feb 2002 13:22:54 -0000 Original-Received: from news by quimby2.netfonds.no with local (Exim 3.12 #1 (Debian)) id 16g46R-0000F9-00 for ; Wed, 27 Feb 2002 14:26:39 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 46 Original-NNTP-Posting-Host: horse01.daimi.au.dk Original-X-Trace: quimby2.netfonds.no 1014816399 938 130.225.18.241 (27 Feb 2002 13:26:39 GMT) Original-X-Complaints-To: usenet@quimby2.netfonds.no Original-NNTP-Posting-Date: 27 Feb 2002 13:26:39 GMT User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i686-pc-linux-gnu) Cancel-Lock: sha1:Q6haiuPgrx4lvUirVe9Ikr2GOr4= Precedence: list X-Majordomo: 1.94.jlt7 Xref: quimby.gnus.org gmane.emacs.gnus.general:43676 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:43676 Hi, When Euddora redirects (their version of our 'S D r') mail it changes the from field to From: redirecters@address.org (Original Sender (by way of Redirecter Foo)) This has annoyed me for a long time (BBDB suggests I change the address og Original Sender to redirecters@address.org. And then I don't like that kind of header. So I looked in the manual and section 3.9.1.4 is almost a solution to my problem. Two problems occured though. The manual is wrong; the arguments of mail-header-set-* should be header string, not string header. When I use my code below it seems it only changes the from field when building the summary buffer and not when displaying the article buffer. Any comments? Should I alter the header from somewhere else (a hook)? ;; Wash Eudoras redirected-by-style from header (defun arj-gnus-alter-eudora-redirected-from-header (header) "Alter Eudoras redirected-by-style from header" (let ((from (mail-header-from header))) (when (string-match "\\(.*\\) (\\(.*\\) (by way of \\(.*\\)))" from) (mail-header-set-from header (match-string 2 from)) ))) (setq gnus-alter-header-function 'arj-gnus-alter-eudora-redirected-from-header) Regards, /arne -- stud. scient. Arne Jørgensen Kollegium 5, 2., v. 222, Universitetsparken, 8000 Århus C tlf: 89 42 72 22, mobil: 21 65 01 13 e-post: arne@daimi.au.dk, http://www.daimi.au.dk/~arne/