Gnus development mailing list
 help / color / mirror / Atom feed
From: deskpot@myrealbox.com (Vasily Korytov)
Subject: [patch] message-make-in-reply-to: use mail-extract-address-components
Date: Fri, 28 Mar 2003 20:45:59 +0300	[thread overview]
Message-ID: <87llyzv0yw.fsf@unix.home> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 709 bytes --]

At present, message-make-in-reply-to does generate not very nice
In-Reply-To headers sometimes. E.g. if the name is quoted (the quotes
remain in this case -- I don't like it) or is specified in the parens
after the address (as in this message; in this case the address is
written instead of the name).

Why re-inventing the wheel, I thought. So I rewrote m-m-i-r-t to use
mail-extract-address-components. It's already used in Gnus, so no new
dependecies with it. The only thing I can say for now: this seems to
work here.

2003-03-28  Vasily Korytov  <deskpot@myrealbox.com>

	* message.el (message-make-in-reply-to): Use
	mail-extract-address-components to dentermine sender's
	name/address.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 030328-message.el.patch --]
[-- Type: text/x-patch, Size: 662 bytes --]

--- message.el~	Thu Mar 27 00:07:44 2003
+++ message.el	Fri Mar 28 20:35:53 2003
@@ -4425,12 +4425,10 @@
 	  (date (mail-header-date message-reply-headers))
 	  (msg-id (mail-header-message-id message-reply-headers)))
       (when from
-	(let ((stop-pos
-	       (string-match "  *at \\|  *@ \\| *(\\| *<" from)))
+	(let ((name (mail-extract-address-components from)))
 	  (concat msg-id (if msg-id " (")
-		  (if (and stop-pos
-			   (not (zerop stop-pos)))
-		      (substring from 0 stop-pos) from)
+		  (or (car name)
+		      (nth 1 name))
 		  "'s message of \""
 		  (if (or (not date) (string= date ""))
 		      "(unknown date)" date)

[-- Attachment #1.3: Type: text/plain, Size: 141 bytes --]

-- 
       I accept RFC3156 and RFC2440-compatible encrypted mail.
PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

             reply	other threads:[~2003-03-28 17:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-28 17:45 Vasily Korytov [this message]
2003-03-30  2:35 ` Lars Magne Ingebrigtsen

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=87llyzv0yw.fsf@unix.home \
    --to=deskpot@myrealbox.com \
    /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).