Gnus development mailing list
 help / color / mirror / Atom feed
* Patch to show `To' header
@ 1999-01-08 14:23 Stefan Waldherr
  1999-01-08 14:47 ` George J McNinch
  1999-01-08 15:10 ` Justin Sheehy
  0 siblings, 2 replies; 24+ messages in thread
From: Stefan Waldherr @ 1999-01-08 14:23 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 380 bytes --]


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.


[-- Attachment #2: tofrom.patch --]
[-- Type: application/octet-stream, Size: 1320 bytes --]

--- ../../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)

[-- Attachment #3: Type: text/plain, Size: 193 bytes --]


cu
Stefan.

-- 
Stefan Waldherr                   fax +49 431 8058 136
                               e-Mail stefan@waldherr.org
                                  www http://www.waldherr.org/

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~1999-01-12 15:59 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-08 14:23 Patch to show `To' header Stefan Waldherr
1999-01-08 14:47 ` George J McNinch
1999-01-08 15:10 ` Justin Sheehy
1999-01-08 15:38   ` Hrvoje Niksic
1999-01-08 15:41     ` Colin Rafferty
1999-01-08 17:42       ` Stefan Waldherr
1999-01-08 18:00         ` Karl Kleinpaste
1999-01-08 18:48           ` Stefan Waldherr
1999-01-12  6:17             ` Lars Magne Ingebrigtsen
1999-01-12 15:59               ` Kai.Grossjohann
1999-01-08 18:04         ` Justin Sheehy
1999-01-09 15:35           ` Kai.Grossjohann
1999-01-08 17:45       ` Hrvoje Niksic
1999-01-08 15:50     ` Karl Kleinpaste
1999-01-08 17:50       ` Hrvoje Niksic
1999-01-08 17:57         ` Justin Sheehy
1999-01-08 18:03         ` Karl Kleinpaste
1999-01-08 18:05         ` Karl Kleinpaste
1999-01-08 18:45           ` Hrvoje Niksic
1999-01-09 15:33             ` Kai.Grossjohann
1999-01-10 16:04               ` Hrvoje Niksic
1999-01-09 15:32         ` Kai.Grossjohann
1999-01-12  6:14       ` Lars Magne Ingebrigtsen
1999-01-09 15:31     ` Kai.Grossjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).