Re: [PATCH] doc: Allow rst2man.py as an alternative to rst2man
[notmuch-archives.git] / 51 / 2bf7d4d65546aaf6003d13a1d4eb503557bfb4
1 Return-Path: <m.walters@qmul.ac.uk>\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 8BCD2431FAF\r
6         for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 11:11:25 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 b8aG2iGrKKgn for <notmuch@notmuchmail.org>;\r
17         Sat,  4 Feb 2012 11:11:24 -0800 (PST)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id EBFAC431FBC\r
22         for <notmuch@notmuchmail.org>; Sat,  4 Feb 2012 11:11:20 -0800 (PST)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1Rtl15-0002yS-4v; Sat, 04 Feb 2012 19:11:19 +0000\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1Rtl14-000355-Lk; Sat, 04 Feb 2012 19:11:19 +0000\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH 2/2] emacs: Improve prompting for user address when\r
35         replying.\r
36 In-Reply-To: <87ipjmo4ri.fsf@nikula.org>\r
37 References: <1328375350-10352-1-git-send-email-markwalters1009@gmail.com>\r
38         <1328375350-10352-3-git-send-email-markwalters1009@gmail.com>\r
39         <87ipjmo4ri.fsf@nikula.org>\r
40 User-Agent: Notmuch/0.11+152~g4d737cf (http://notmuchmail.org) Emacs/23.2.1\r
41         (i486-pc-linux-gnu)\r
42 Date: Sat, 04 Feb 2012 19:12:28 +0000\r
43 Message-ID: <87haz6h0pv.fsf@qmul.ac.uk>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 X-Sender-Host-Address: 94.192.233.223\r
47 X-QM-SPAM-Info: Sender has good ham record.  :)\r
48 X-QM-Body-MD5: 0ba94740333f809189eafa56aec07388 (of first 20000 bytes)\r
49 X-SpamAssassin-Score: -1.8\r
50 X-SpamAssassin-SpamBar: -\r
51 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
52         determine if it is\r
53         spam. We require at least 5.0 points to mark a message as spam.\r
54         This message scored -1.8 points.\r
55         Summary of the scoring: \r
56         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
57         *      medium trust\r
58         *      [138.37.6.40 listed in list.dnswl.org]\r
59         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
60         provider *      (markwalters1009[at]gmail.com)\r
61         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
62         *      domain\r
63         *  0.5 AWL AWL: From: address is in the auto white-list\r
64 X-QM-Scan-Virus: ClamAV says the message is clean\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Sat, 04 Feb 2012 19:11:25 -0000\r
78 \r
79 \r
80 On Sat, 04 Feb 2012 20:03:13 +0200, Jani Nikula <jani@nikula.org> wrote:\r
81 > On Sat,  4 Feb 2012 17:09:10 +0000, Mark Walters <markwalters1009@gmail.com> wrote:\r
82 > > This patch uses the new --from option to notmuch reply to allow it to\r
83 > > prompt the user for the From: address in cases when the cli does not\r
84 > > know the "correct" from address. If the cli does not it either uses\r
85 > > the users default address or, if notmuch-always-prompt-for-sender\r
86 > > is set, prompts the user.\r
87 > > ---\r
88 > >  emacs/notmuch-mua.el |   47 ++++++++++++++++++++++++++++-------------------\r
89 > >  1 files changed, 28 insertions(+), 19 deletions(-)\r
90 > > \r
91 > > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
92 > > index 41f82c2..36e62f9 100644\r
93 > > --- a/emacs/notmuch-mua.el\r
94 > > +++ b/emacs/notmuch-mua.el\r
95 > > @@ -51,6 +51,24 @@ list."\r
96 > >  \r
97 > >  ;;\r
98 > >  \r
99 > > +(defcustom notmuch-identities nil\r
100 > > +  "Identities that can be used as the From: address when composing a new message.\r
101 > > +\r
102 > > +If this variable is left unset, then a list will be constructed from the\r
103 > > +name and addresses configured in the notmuch configuration file."\r
104 > > +  :type '(repeat string)\r
105 > > +  :group 'notmuch-send)\r
106 > > +\r
107 > > +(defcustom notmuch-always-prompt-for-sender nil\r
108 > > +  "Always prompt for the From: address when composing or forwarding a message.\r
109 > > +\r
110 > > +This is not taken into account when replying to a message, because in that case\r
111 > > +the From: header is already filled in by notmuch."\r
112 > > +  :type 'boolean\r
113 > > +  :group 'notmuch-send)\r
114 > > +\r
115 > > +(defvar notmuch-mua-sender-history nil)\r
116 > > +\r
117 > >  (defun notmuch-mua-user-agent-full ()\r
118 > >    "Generate a `User-Agent:' string suitable for notmuch."\r
119 > >    (concat (notmuch-mua-user-agent-notmuch)\r
120 > > @@ -75,7 +93,7 @@ list."\r
121 > >  (defun notmuch-mua-reply (query-string &optional sender reply-all)\r
122 > >    (let (headers\r
123 > >     body\r
124 > > -   (args '("reply")))\r
125 > > +   (args '("reply" "--from=fallback-received")))\r
126\r
127 > There are better reviewers for the rest of the emacs bits, but wouldn't\r
128 > it be better to just use the "notmuch reply" default when the user wants\r
129 > the current behaviour?\r
130 \r
131 Does any user actually want to be prompted for a From address when\r
132 mailing/forwarding normally but not when replying and there is no reason\r
133 to choose one address over another?\r
134 \r
135 What I would actually like is to consolidate the From address choosing\r
136 so that it occurs in one place in the emacs code, so the three\r
137 (mail/forward/reply) naturally behave the same.\r
138 \r
139 Thanks for the rapid review (and the significant bug catch!)\r
140 \r
141 Best wishes\r
142 \r
143 Mark\r
144 \r
145 \r
146 > BR,\r
147 > Jani.\r
148\r
149\r
150 > >      (if notmuch-show-process-crypto\r
151 > >     (setq args (append args '("--decrypt"))))\r
152 > >      (if reply-all\r
153 > > @@ -99,6 +117,15 @@ list."\r
154 > >      ;; If sender is non-nil, set the From: header to its value.\r
155 > >      (when sender\r
156 > >        (mail-header-set 'from sender headers))\r
157 > > +    ;; If we do not have a From: header yet it means that\r
158 > > +    ;; notmuch-reply.c was not able to make a useful guess so we fill\r
159 > > +    ;; it in ourselves.\r
160 > > +    (when (string= "" (mail-header 'from headers))\r
161 > > +      (if notmuch-always-prompt-for-sender\r
162 > > +     (setq sender (notmuch-mua-prompt-for-sender))\r
163 > > +   (setq sender (concat\r
164 > > +                 (notmuch-user-name) " <" (notmuch-user-primary-email) ">")))\r
165 > > +      (mail-header-set 'from sender headers))\r
166 > >      (let\r
167 > >     ;; Overlay the composition window on that being used to read\r
168 > >     ;; the original message.\r
169 > > @@ -153,24 +180,6 @@ OTHER-ARGS are passed through to `message-mail'."\r
170 > >  \r
171 > >    (message-goto-to))\r
172 > >  \r
173 > > -(defcustom notmuch-identities nil\r
174 > > -  "Identities that can be used as the From: address when composing a new message.\r
175 > > -\r
176 > > -If this variable is left unset, then a list will be constructed from the\r
177 > > -name and addresses configured in the notmuch configuration file."\r
178 > > -  :type '(repeat string)\r
179 > > -  :group 'notmuch-send)\r
180 > > -\r
181 > > -(defcustom notmuch-always-prompt-for-sender nil\r
182 > > -  "Always prompt for the From: address when composing or forwarding a message.\r
183 > > -\r
184 > > -This is not taken into account when replying to a message, because in that case\r
185 > > -the From: header is already filled in by notmuch."\r
186 > > -  :type 'boolean\r
187 > > -  :group 'notmuch-send)\r
188 > > -\r
189 > > -(defvar notmuch-mua-sender-history nil)\r
190 > > -\r
191 > >  (defun notmuch-mua-prompt-for-sender ()\r
192 > >    (interactive)\r
193 > >    (let (name addresses one-name-only)\r
194 > > -- \r
195 > > 1.7.2.3\r
196 > > \r
197 > > _______________________________________________\r
198 > > notmuch mailing list\r
199 > > notmuch@notmuchmail.org\r
200 > > http://notmuchmail.org/mailman/listinfo/notmuch\r