From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59108 Path: main.gmane.org!not-for-mail From: ari@mbf.ocn.ne.jp (ARISAWA Akihiro) Newsgroups: gmane.emacs.gnus.general Subject: patch: improved message-use-alternative-email-as-from Date: Thu, 11 Nov 2004 18:14:36 +0900 Organization: Infosphere Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1100184850 3641 80.91.229.6 (11 Nov 2004 14:54:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2004 14:54:10 +0000 (UTC) Original-X-From: ding-owner+M7648@lists.math.uh.edu Thu Nov 11 15:53:55 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CSGKg-0000Bj-00 for ; Thu, 11 Nov 2004 15:53:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CSGJQ-0001Px-00; Thu, 11 Nov 2004 08:52:36 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CSBHh-0000gY-00 for ding@lists.math.uh.edu; Thu, 11 Nov 2004 03:30:29 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CSBHf-0000pW-Ah for ding@lists.math.uh.edu; Thu, 11 Nov 2004 03:30:27 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id 538833A003A for ; Thu, 11 Nov 2004 03:30:26 -0600 (CST) Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CSBHd-0000cp-00 for ; Thu, 11 Nov 2004 10:30:25 +0100 Original-Received: from yahoobb220003182039.bbtec.net ([220.3.182.39]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 10:30:25 +0100 Original-Received: from ari by yahoobb220003182039.bbtec.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Nov 2004 10:30:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: yahoobb220003182039.bbtec.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:XeDZAjePueUTIk/c8z7h9RWY33o= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59108 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59108 --=-=-= 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=message.el.patch 2004-11-11 ARISAWA Akihiro * 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))) --=-=-=--