1 Return-Path: <schnouki@schnouki.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 5D818431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 26 May 2011 10:23:19 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id R+G6GJakNd3a for <notmuch@notmuchmail.org>;
\r
17 Thu, 26 May 2011 10:23:18 -0700 (PDT)
\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])
\r
19 by olra.theworths.org (Postfix) with ESMTP id A80BE431FD0
\r
20 for <notmuch@notmuchmail.org>; Thu, 26 May 2011 10:23:18 -0700 (PDT)
\r
21 Received: from localhost.localdomain (nancy.schnouki.net [78.238.0.45])
\r
22 by ks3536.kimsufi.com (Postfix) with ESMTPSA id 39D216A06A9;
\r
23 Thu, 26 May 2011 19:23:17 +0200 (CEST)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
25 s=key-schnouki; t=1306430597;
\r
26 bh=pRN59aO+bJRthuDyGm+rtKva7tcyTI43uinGa4QN14Q=;
\r
27 h=From:To:Subject:Date:Message-Id:In-Reply-To:References;
\r
28 b=f+njBWZFZa/7l8yxrQb7ZHw94whMdXmwI9prGH44mOgWaopRNoQkLafXYLvOCV3dL
\r
29 O/9QyFQpopCl2zuCxbGSx7bjLGNZV+gBk4Ui1OdLAM/9NMr2DVgqrAMdRChxw3Hzma
\r
30 ijPoMM3wizlBaPMBrdmCuR4fAlSbTXP/b6zZ1w7U=
\r
31 From: Thomas Jost <schnouki@schnouki.net>
\r
32 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
33 Carl Worth <cworth@cworth.org>, Stewart Smith <stewart@flamingspork.com>,
\r
34 notmuch <notmuch@notmuchmail.org>
\r
35 Subject: [PATCH] emacs: Add a customization allowing to always prompt for the
\r
36 "From" address when composing a new message
\r
37 Date: Thu, 26 May 2011 19:22:41 +0200
\r
38 Message-Id: <1306430561-14293-1-git-send-email-schnouki@schnouki.net>
\r
39 X-Mailer: git-send-email 1.7.5.2
\r
40 In-Reply-To: <87oc2plbj6.fsf@servo.factory.finestructure.net>
\r
41 References: <87oc2plbj6.fsf@servo.factory.finestructure.net>
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Thu, 26 May 2011 17:23:19 -0000
\r
59 Here it is :) I'm sure it will be useful for many other people too, including
\r
60 myself. To be applied on top of my other patches, then you can set
\r
61 notmuch-always-prompt-for-sender to t.
\r
66 emacs/notmuch-mua.el | 11 ++++++++---
\r
67 1 files changed, 8 insertions(+), 3 deletions(-)
\r
69 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
70 index f2d86bb..7c05a81 100644
\r
71 --- a/emacs/notmuch-mua.el
\r
72 +++ b/emacs/notmuch-mua.el
\r
73 @@ -154,6 +154,11 @@ name and addresses configured in the notmuch configuration file."
\r
75 :type '(repeat string))
\r
77 +(defcustom notmuch-always-prompt-for-sender nil
\r
78 + "Always prompt for the From: address when composing a new message."
\r
82 (defun notmuch-mua-sender-collection ()
\r
83 (if notmuch-identities
\r
85 @@ -176,7 +181,7 @@ If PROMPT-FOR-SENDER is non-nil, the user will be prompted for
\r
86 the From: address first."
\r
88 (let ((other-headers
\r
89 - (when prompt-for-sender
\r
90 + (when (or prompt-for-sender notmuch-always-prompt-for-sender)
\r
91 (list (cons 'from (notmuch-mua-prompt-for-sender))))))
\r
92 (notmuch-mua-mail nil nil other-headers)))
\r
94 @@ -186,7 +191,7 @@ the From: address first."
\r
95 If PROMPT-FOR-SENDER is non-nil, the user will be prompted for
\r
96 the From: address first."
\r
98 - (if prompt-for-sender
\r
99 + (if (or prompt-for-sender notmuch-always-prompt-for-sender)
\r
100 (let* ((sender (notmuch-mua-prompt-for-sender))
\r
101 (address-components (mail-extract-address-components sender))
\r
102 (user-full-name (car address-components))
\r
103 @@ -198,7 +203,7 @@ the From: address first."
\r
104 "Invoke the notmuch reply window."
\r
107 - (when prompt-for-sender
\r
108 + (when (or prompt-for-sender notmuch-always-prompt-for-sender)
\r
109 (notmuch-mua-prompt-for-sender))))
\r
110 (notmuch-mua-reply query-string sender)))
\r