From: aeuii Date: Fri, 8 Apr 2016 21:43:27 +0000 (+0200) Subject: [PATCH] emacs: make use of `message-make-from' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7937709ddff0a769adb50bcd5aaca8c3c4844430;p=notmuch-archives.git [PATCH] emacs: make use of `message-make-from' --- diff --git a/f9/45d68e47e3ea82c582fb640a3b70b22ce19bc0 b/f9/45d68e47e3ea82c582fb640a3b70b22ce19bc0 new file mode 100644 index 000000000..bd72fb5b6 --- /dev/null +++ b/f9/45d68e47e3ea82c582fb640a3b70b22ce19bc0 @@ -0,0 +1,102 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 24ABC6DE028C + for ; Fri, 8 Apr 2016 14:51:40 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.895 +X-Spam-Level: +X-Spam-Status: No, score=0.895 tagged_above=-999 required=5 + tests=[HK_RANDOM_ENVFROM=0.626, HK_RANDOM_FROM=1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0_6jOO4U8_oP for ; + Fri, 8 Apr 2016 14:51:31 -0700 (PDT) +X-Greylist: delayed 476 seconds by postgrey-1.35 at arlo; + Fri, 08 Apr 2016 14:51:31 PDT +Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) + by arlo.cworth.org (Postfix) with ESMTPS id 79B886DE0173 + for ; Fri, 8 Apr 2016 14:51:31 -0700 (PDT) +Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) + by mout01.posteo.de (Postfix) with ESMTPS id CE0892097C + for ; Fri, 8 Apr 2016 23:43:32 +0200 (CEST) +Received: from mail.posteo.de (localhost [127.0.0.1]) + by dovecot03.posteo.de (Postfix) with ESMTPSA id 3qhXyX3JhSz5vN8 + for ; Fri, 8 Apr 2016 23:43:31 +0200 (CEST) +From: aeuii@posteo.de +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: make use of `message-make-from' +Date: Fri, 08 Apr 2016 23:43:27 +0200 +Message-ID: <86h9fbwzcw.fsf@posteo.de> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +X-Mailman-Approved-At: Sat, 09 Apr 2016 05:12:59 -0700 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 08 Apr 2016 21:51:40 -0000 + +--=-=-= +Content-Type: text/plain + +Please put my address in CC when replying. Thanks! + + +--=-=-= +Content-Type: text/x-diff +Content-Disposition: inline; + filename=0001-emacs-make-use-of-message-make-from.patch + +>From 4b9ab261a0ea8a31065e310c5150f522be86d37b Mon Sep 17 00:00:00 2001 +From: stefan +Date: Fri, 8 Apr 2016 22:47:06 +0200 +Subject: [PATCH] emacs: make use of `message-make-from' + +Will respect `mail-from-style'. +--- + emacs/notmuch-mua.el | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +index cfdac0e..935cbd3 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -318,8 +318,8 @@ modified. This function is notmuch addaptation of + (push (cons 'User-Agent user-agent) other-headers)))) + + (unless (assq 'From other-headers) +- (push (cons 'From (concat +- (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers)) ++ (push (cons 'From (message-make-from ++ (notmuch-user-name) (notmuch-user-primary-email))) other-headers)) + + (notmuch-mua-pop-to-buffer (message-buffer-name "mail" to) + (or switch-function (notmuch-mua-get-switch-function))) +@@ -393,7 +393,7 @@ the From: header is already filled in by notmuch." + (ido-completing-read (concat "Sender address for " name ": ") addrs + nil nil nil 'notmuch-mua-sender-history + (car addrs)))) +- (concat name " <" address ">")))) ++ (message-make-from name address)))) + + (put 'notmuch-mua-new-mail 'notmuch-prefix-doc "... and prompt for sender") + (defun notmuch-mua-new-mail (&optional prompt-for-sender) +-- +2.7.4 + + +--=-=-=--