database error
[notmuch-archives.git] / 0d / f94afd04e20904e5fc4c137f26b2c470b9a28d
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 345A1431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 01:41:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.1\r
10 X-Spam-Level: \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
13         autolearn=disabled\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 a-7OM-em5ofT for <notmuch@notmuchmail.org>;\r
17         Thu, 26 May 2011 01:41:53 -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 9B57D429E27\r
20         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 01:41:52 -0700 (PDT)\r
21 Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id EA2A26A06AD;\r
23         Thu, 26 May 2011 10:41:51 +0200 (CEST)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1306399312;\r
26         bh=M+6kTbGC+lLcGPCt4WnIeT7UGMgue7zyjkCZPAFHtC8=;\r
27         h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
28         b=jZuU8nkZNWYhSF5YqMqB/LWcBnM4B04r1BlyfKpg0IHtrLNaPymrm6lslA78fZ9Ai\r
29         cJ3GKF0CBNXk6A0RlYSgI6DrTAT9DiTMjcH45aUqQUMRqHVWaQNz3DPwV3DIK9hj2K\r
30         dy26C8Z4I81Y6n5qXlP2XRX3sZPS8htv+qdkjBJ8=\r
31 From: Thomas Jost <schnouki@schnouki.net>\r
32 To: Carl Worth <cworth@cworth.org>, Stewart Smith <stewart@flamingspork.com>,\r
33         notmuch <notmuch@notmuchmail.org>\r
34 Subject: [PATCH v2 2/4] emacs: Allow the user to choose the "From" address\r
35         when composing a new message\r
36 Date: Thu, 26 May 2011 10:41:31 +0200\r
37 Message-Id: <1306399293-22215-2-git-send-email-schnouki@schnouki.net>\r
38 X-Mailer: git-send-email 1.7.5.1\r
39 In-Reply-To: <1306399293-22215-1-git-send-email-schnouki@schnouki.net>\r
40 References: <87hb8hlush.fsf@thor.loria.fr>\r
41         <1306399293-22215-1-git-send-email-schnouki@schnouki.net>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\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 08:41:54 -0000\r
55 \r
56 When pressing C-u m, the user will be prompted for the identity to use.\r
57 ---\r
58  emacs/notmuch-hello.el |    2 +-\r
59  emacs/notmuch-mua.el   |   11 +++++++++++\r
60  emacs/notmuch-show.el  |    2 +-\r
61  emacs/notmuch.el       |    2 +-\r
62  4 files changed, 14 insertions(+), 3 deletions(-)\r
63 \r
64 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
65 index e58dd24..ab06d3a 100644\r
66 --- a/emacs/notmuch-hello.el\r
67 +++ b/emacs/notmuch-hello.el\r
68 @@ -298,7 +298,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
69      (define-key map "=" 'notmuch-hello-update)\r
70      (define-key map "G" 'notmuch-hello-poll-and-update)\r
71      (define-key map (kbd "<C-tab>") 'widget-backward)\r
72 -    (define-key map "m" 'notmuch-mua-mail)\r
73 +    (define-key map "m" 'notmuch-mua-new-mail)\r
74      (define-key map "s" 'notmuch-hello-goto-search)\r
75      map)\r
76    "Keymap for \"notmuch hello\" buffers.")\r
77 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
78 index 2baf6bd..74c9fc1 100644\r
79 --- a/emacs/notmuch-mua.el\r
80 +++ b/emacs/notmuch-mua.el\r
81 @@ -166,6 +166,17 @@ name and addresses configured in the notmuch configuration file."\r
82      (ido-completing-read "Send mail From: " collection\r
83                          nil 'confirm nil 'notmuch-mua-sender-history (car collection))))\r
84  \r
85 +(defun notmuch-mua-new-mail (&optional prompt-for-sender)\r
86 +  "Invoke the notmuch mail composition window.\r
87 +\r
88 +If PROMPT-FOR-SENDER is non-nil, the user will be prompted for\r
89 +the From: address first."\r
90 +  (interactive "P")\r
91 +  (let ((other-headers\r
92 +        (when prompt-for-sender\r
93 +          (list (cons 'from (notmuch-mua-prompt-for-sender))))))\r
94 +    (notmuch-mua-mail nil nil other-headers)))\r
95 +\r
96  (defun notmuch-mua-send-and-exit (&optional arg)\r
97    (interactive "P")\r
98    (message-send-and-exit arg))\r
99 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
100 index 825988c..48d2926 100644\r
101 --- a/emacs/notmuch-show.el\r
102 +++ b/emacs/notmuch-show.el\r
103 @@ -847,7 +847,7 @@ function is used. "\r
104         (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
105         (define-key map (kbd "TAB") 'notmuch-show-next-button)\r
106         (define-key map "s" 'notmuch-search)\r
107 -       (define-key map "m" 'notmuch-mua-mail)\r
108 +       (define-key map "m" 'notmuch-mua-new-mail)\r
109         (define-key map "f" 'notmuch-show-forward-message)\r
110         (define-key map "r" 'notmuch-show-reply)\r
111         (define-key map "|" 'notmuch-show-pipe-message)\r
112 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
113 index 1d683f8..21e0314 100644\r
114 --- a/emacs/notmuch.el\r
115 +++ b/emacs/notmuch.el\r
116 @@ -204,7 +204,7 @@ For a mouse binding, return nil."\r
117      (define-key map "p" 'notmuch-search-previous-thread)\r
118      (define-key map "n" 'notmuch-search-next-thread)\r
119      (define-key map "r" 'notmuch-search-reply-to-thread)\r
120 -    (define-key map "m" 'notmuch-mua-mail)\r
121 +    (define-key map "m" 'notmuch-mua-new-mail)\r
122      (define-key map "s" 'notmuch-search)\r
123      (define-key map "o" 'notmuch-search-toggle-order)\r
124      (define-key map "c" 'notmuch-search-stash-map)\r
125 -- \r
126 1.7.5.1\r
127 \r