From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/20149 Path: main.gmane.org!not-for-mail From: Stefan Waldherr Newsgroups: gmane.emacs.gnus.general Subject: Patch to show `To' header Date: 08 Jan 1999 15:23:51 +0100 Organization: -=-=-=-=- Sender: owner-ding@hpc.uh.edu Message-ID: Reply-To: Stefan Waldherr NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Fri_Jan__8_15:23:50_1999-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035158494 16214 80.91.224.250 (21 Oct 2002 00:01:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:01:34 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA29578 for ; Fri, 8 Jan 1999 09:26:41 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id IAB24118; Fri, 8 Jan 1999 08:26:18 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 08 Jan 1999 08:26:10 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id IAA18635 for ; Fri, 8 Jan 1999 08:25:59 -0600 (CST) Original-Received: from falbala.informatik.uni-kiel.de (6K+wj1s/DExTZsxqltyw79Rxfk1+sml9@falbala.informatik.uni-kiel.de [134.245.252.14]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id JAA29564 for ; Fri, 8 Jan 1999 09:25:49 -0500 (EST) Original-Received: from moritz.dial.techfak.uni-kiel.de (moritz.dial.techfak.uni-kiel.de [134.245.244.143]) by falbala.informatik.uni-kiel.de (8.9.1/8.9.1) with ESMTP id PAA15498 for ; Fri, 8 Jan 1999 15:26:13 +0100 (MET) Original-Received: from amadeus.waldherr.org (swa@l33.dial.techfak.uni-kiel.de [134.245.247.33]) by moritz.dial.techfak.uni-kiel.de (8.8.5/8.8.5) with ESMTP id PAA01517 for ; Fri, 8 Jan 1999 15:25:45 +0100 (MET) Original-Received: (from swa@localhost) by amadeus.waldherr.org (8.8.7/8.8.7) id PAA02381; Fri, 8 Jan 1999 15:23:51 +0100 Original-To: ding@gnus.org X-Url: http://www.waldherr.org/ X-Face: "-=6){9J':KXui`/fiH#,g(pr\2Rv'7{dSci>!;1r2zpWB*qcI6gH^LoLQjSSNSg@ee_n~dV]|;5T7=d6_FNPEvqKDk`OWLB[CKOkG.M6{J.??WB*1Wk`y?de2[56)Iv"y#tg@p]~%_3>&;;PQ-{A)UcZ_?nj@b(FN]!Sq6QS9YuGJZ3qkdPq(h-olTvcq0,TS%?i]ddP2E'&^ud Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:20149 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:20149 This is a MIME multipart message. If you are reading this, you shouldn't. --Multipart_Fri_Jan__8_15:23:50_1999-1 Content-Type: text/plain; charset=US-ASCII Hi, attached is a patch (that works also for pgnus) that shows the content of the `To' field instead of one's own name in the Summary buffer if the mail is from oneself. This feature is very convenient and ought to be integrated into pgnus (in this form or another). I don't remember where I found this patch originally -- it may have been submitted to the ding list before. --Multipart_Fri_Jan__8_15:23:50_1999-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="tofrom.patch" Content-Transfer-Encoding: 7bit --- ../../gnus-5.6.38/lisp/nnheader.el Fri Jun 26 04:26:47 1998 +++ nnheader.el Sun Aug 16 19:11:48 1998 @@ -54,6 +54,14 @@ \(setq nnheader-file-name-translation-alist '((?: . ?_)))") +(defvar nnheader-user-address-regexp (user-full-name) + "*Regexp matching the user's name and/or address as it appears in the +\"From:\" header.") + +(defvar nnheader-nov-uses-to nil + "*If nnheader-nov-uses-to is t, the recipient will be listed in the summary +if the \"From:\" field matches nnheader-user-address-regexp.") + (eval-and-compile (autoload 'nnmail-message-id "nnmail") (autoload 'mail-position-on-field "sendmail") @@ -205,8 +213,19 @@ ;; From. (progn (goto-char p) - (if (search-forward "\nfrom: " nil t) - (nnheader-header-value) "(nobody)")) + (goto-char p) + (let (from) + (setq from (if (search-forward "\nfrom: " nil t) + (nnheader-header-value) "(nobody)")) + (cond ((and nnheader-nov-uses-to + (string-match nnheader-user-address-regexp from)) + (goto-char p) + (if (search-forward "\nto: " nil t) + (concat "To:" (nnheader-header-value)) + "To:(nobody)")) + (t from)))) +; (if (search-forward "\nfrom: " nil t) +; (nnheader-header-value) "(nobody)")) ;; Date. (progn (goto-char p) --Multipart_Fri_Jan__8_15:23:50_1999-1 Content-Type: text/plain; charset=US-ASCII cu Stefan. -- Stefan Waldherr fax +49 431 8058 136 e-Mail stefan@waldherr.org www http://www.waldherr.org/ --Multipart_Fri_Jan__8_15:23:50_1999-1--