Gnus development mailing list
 help / color / mirror / Atom feed
* patch: improved message-use-alternative-email-as-from
@ 2004-11-11  9:14 ARISAWA Akihiro
  2004-11-12  1:58 ` Katsumi Yamaoka
  0 siblings, 1 reply; 2+ messages in thread
From: ARISAWA Akihiro @ 2004-11-11  9:14 UTC (permalink / raw)


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

Hi,

Here is a tiny patch improved message-use-alternative-email-as-from.

(1) Check "From" field in addition to "To" and "Cc".
    (It may be better the fields are customizable.)
(2) When alternative address was found, use `message-make-from' in order to
    supply user-full-name.

Regards,
ARISAWA Akihiro

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

2004-11-11  ARISAWA Akihiro  <ari@mbf.ocn.ne.jp>

	* message.el (message-use-alternative-email-as-from): Check From field.
	Use `message-make-from'.

Index: lisp/message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 7.57
diff -u -r7.57 message.el
--- lisp/message.el	2 Nov 2004 02:54:23 -0000	7.57
+++ lisp/message.el	8 Nov 2004 13:50:29 -0000
@@ -6856,7 +6856,7 @@
 
 (defun message-use-alternative-email-as-from ()
   (require 'mail-utils)
-  (let* ((fields '("To" "Cc"))
+  (let* ((fields '("To" "Cc" "From"))
 	 (emails
 	  (split-string
 	   (mail-strip-quoted-names
@@ -6870,7 +6870,8 @@
       (pop emails))
     (unless (or (not email) (equal email user-mail-address))
       (goto-char (point-max))
-      (insert "From: " email "\n"))))
+      (insert "From: " (let ((user-mail-address email)) (message-make-from))
+	      "\n"))))
 
 (defun message-options-get (symbol)
   (cdr (assq symbol message-options)))

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

* Re: patch: improved message-use-alternative-email-as-from
  2004-11-11  9:14 patch: improved message-use-alternative-email-as-from ARISAWA Akihiro
@ 2004-11-12  1:58 ` Katsumi Yamaoka
  0 siblings, 0 replies; 2+ messages in thread
From: Katsumi Yamaoka @ 2004-11-12  1:58 UTC (permalink / raw)
  Cc: ding

>>>>> In <m3oei4zr0j.fsf@puyo.nijino.com> ARISAWA Akihiro wrote:

> Here is a tiny patch improved message-use-alternative-email-as-from.

> (1) Check "From" field in addition to "To" and "Cc".
>     (It may be better the fields are customizable.)
> (2) When alternative address was found, use `message-make-from' in order to
>     supply user-full-name.

I'm sorry for the late reply.  It took time to recall how
m-u-a-e-a-f and message-alternative-emails act. ;-)  I've
committed the patch in the Gnus trunk.  It seems very useful to
those who have several mail addresses.  Than you.

;; I don't forget to investigate Romain's report.



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

end of thread, other threads:[~2004-11-12  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-11  9:14 patch: improved message-use-alternative-email-as-from ARISAWA Akihiro
2004-11-12  1:58 ` Katsumi Yamaoka

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