From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51059 Path: main.gmane.org!not-for-mail From: deskpot@myrealbox.com (Vasily Korytov) Newsgroups: gmane.emacs.gnus.general Subject: [patch] message-make-in-reply-to: use mail-extract-address-components Date: Fri, 28 Mar 2003 20:45:59 +0300 Sender: owner-ding@hpc.uh.edu Message-ID: <87llyzv0yw.fsf@unix.home> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1048873376 21108 80.91.224.249 (28 Mar 2003 17:42:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2003 17:42:56 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Fri Mar 28 18:42:54 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18yxsU-0005UB-00 for ; Fri, 28 Mar 2003 18:42:54 +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 18yxru-0000RB-00; Fri, 28 Mar 2003 11:42:18 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 28 Mar 2003 11:43:22 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id LAA04967 for ; Fri, 28 Mar 2003 11:43:09 -0600 (CST) Original-Received: (qmail 83169 invoked by alias); 28 Mar 2003 17:42:01 -0000 Original-Received: (qmail 83164 invoked from network); 28 Mar 2003 17:42:00 -0000 Original-Received: from ns1.telekom.ru (HELO smtp.telekom.ru) (root@194.190.198.2) by 66.230.238.6 with SMTP; 28 Mar 2003 17:42:00 -0000 Original-Received: from unix.home (h68.217.elnet.msk.ru [194.190.217.68]) by smtp.telekom.ru (8.12.8/8.12.8) with SMTP id h2SHfSYF013233 for ; Fri, 28 Mar 2003 20:41:29 +0300 Original-Received: (qmail 1136 invoked from network); 28 Mar 2003 17:46:46 -0000 Original-Received: from localhost (alias@127.0.0.1) by localhost with QMTP; 28 Mar 2003 17:46:46 -0000 Original-Received: (qmail 1092 invoked by uid 1000); 28 Mar 2003 17:45:59 -0000 Original-To: ding@gnus.org X-Attribution: VK Mail-Copies-To: never User-Agent: Gnus/5.090017 (Oort Gnus v0.17) XEmacs/21.4 (Portable Code) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51059 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51059 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Transfer-Encoding: quoted-printable 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 * message.el (message-make-in-reply-to): Use mail-extract-address-components to dentermine sender's name/address. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=030328-message.el.patch Content-Transfer-Encoding: quoted-printable =2D-- 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 =2D (let ((stop-pos =2D (string-match " *at \\| *@ \\| *(\\| *<" from))) + (let ((name (mail-extract-address-components from))) (concat msg-id (if msg-id " (") =2D (if (and stop-pos =2D (not (zerop stop-pos))) =2D (substring from 0 stop-pos) from) + (or (car name) + (nth 1 name)) "'s message of \"" (if (or (not date) (string=3D date "")) "(unknown date)" date) --=-=-= Content-Transfer-Encoding: quoted-printable =2D-=20 I accept RFC3156 and RFC2440-compatible encrypted mail. PGP key fingerprint: 123A 7CCE 6E26 6233 0D87 E01A A0F8 3524 FCD8 1841 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+hIpXoPg1JPzYGEERAkWMAKDuviLf4gN6/oIGEESPFMlPEel6dwCfVVwA qv6IPU/kkJrc2D2lTSTtJ98= =beT4 -----END PGP SIGNATURE----- --==-=-=--