Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan Waldherr <stefan@waldherr.org>
Subject: Patch to show `To' header
Date: 08 Jan 1999 15:23:51 +0100	[thread overview]
Message-ID: <upkhfu1g7wo.fsf@amadeus.waldherr.org> (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/

             reply	other threads:[~1999-01-08 14:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-08 14:23 Stefan Waldherr [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=upkhfu1g7wo.fsf@amadeus.waldherr.org \
    --to=stefan@waldherr.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).