From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5D818431FB6 for ; Thu, 26 May 2011 10:23:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R+G6GJakNd3a for ; Thu, 26 May 2011 10:23:18 -0700 (PDT) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id A80BE431FD0 for ; Thu, 26 May 2011 10:23:18 -0700 (PDT) Received: from localhost.localdomain (nancy.schnouki.net [78.238.0.45]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id 39D216A06A9; Thu, 26 May 2011 19:23:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1306430597; bh=pRN59aO+bJRthuDyGm+rtKva7tcyTI43uinGa4QN14Q=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=f+njBWZFZa/7l8yxrQb7ZHw94whMdXmwI9prGH44mOgWaopRNoQkLafXYLvOCV3dL O/9QyFQpopCl2zuCxbGSx7bjLGNZV+gBk4Ui1OdLAM/9NMr2DVgqrAMdRChxw3Hzma ijPoMM3wizlBaPMBrdmCuR4fAlSbTXP/b6zZ1w7U= From: Thomas Jost To: Jameson Graef Rollins , Carl Worth , Stewart Smith , notmuch Subject: [PATCH] emacs: Add a customization allowing to always prompt for the "From" address when composing a new message Date: Thu, 26 May 2011 19:22:41 +0200 Message-Id: <1306430561-14293-1-git-send-email-schnouki@schnouki.net> X-Mailer: git-send-email 1.7.5.2 In-Reply-To: <87oc2plbj6.fsf@servo.factory.finestructure.net> References: <87oc2plbj6.fsf@servo.factory.finestructure.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Thu, 26 May 2011 17:23:19 -0000 --- Hi Jameson, Here it is :) I'm sure it will be useful for many other people too, including myself. To be applied on top of my other patches, then you can set notmuch-always-prompt-for-sender to t. Regards, Thomas emacs/notmuch-mua.el | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index f2d86bb..7c05a81 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -154,6 +154,11 @@ name and addresses configured in the notmuch configuration file." :group 'notmuch :type '(repeat string)) +(defcustom notmuch-always-prompt-for-sender nil + "Always prompt for the From: address when composing a new message." + :group 'notmuch + :type 'boolean) + (defun notmuch-mua-sender-collection () (if notmuch-identities notmuch-identities @@ -176,7 +181,7 @@ If PROMPT-FOR-SENDER is non-nil, the user will be prompted for the From: address first." (interactive "P") (let ((other-headers - (when prompt-for-sender + (when (or prompt-for-sender notmuch-always-prompt-for-sender) (list (cons 'from (notmuch-mua-prompt-for-sender)))))) (notmuch-mua-mail nil nil other-headers))) @@ -186,7 +191,7 @@ the From: address first." If PROMPT-FOR-SENDER is non-nil, the user will be prompted for the From: address first." (interactive "P") - (if prompt-for-sender + (if (or prompt-for-sender notmuch-always-prompt-for-sender) (let* ((sender (notmuch-mua-prompt-for-sender)) (address-components (mail-extract-address-components sender)) (user-full-name (car address-components)) @@ -198,7 +203,7 @@ the From: address first." "Invoke the notmuch reply window." (interactive "P") (let ((sender - (when prompt-for-sender + (when (or prompt-for-sender notmuch-always-prompt-for-sender) (notmuch-mua-prompt-for-sender)))) (notmuch-mua-reply query-string sender))) -- 1.7.5.2