[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 1d / 11cb2887bd82eb88ec6fd13e3cbd746fd80f5e
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 2F858431FC0\r
6         for <notmuch@notmuchmail.org>; Tue, 29 Apr 2014 03:14:28 -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.502\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.502 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_LOW=-0.7] 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 dVbWcJ0dFogr for <notmuch@notmuchmail.org>;\r
17         Tue, 29 Apr 2014 03:14:22 -0700 (PDT)\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 746B3431FBD\r
22         for <notmuch@notmuchmail.org>; Tue, 29 Apr 2014 03:14:22 -0700 (PDT)\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 1Wf53G-00034b-Jz; Tue, 29 Apr 2014 11:14:17 +0100\r
27 Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1Wf53G-0001sR-94; Tue, 29 Apr 2014 11:14:14 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] emacs: allow functions in\r
34         notmuch-show-stash-mlarchive-link-alist\r
35 In-Reply-To: <1398761130-26865-1-git-send-email-jani@nikula.org>\r
36 References: <1398761130-26865-1-git-send-email-jani@nikula.org>\r
37 User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Tue, 29 Apr 2014 11:14:13 +0100\r
40 Message-ID: <874n1cbfyi.fsf@qmul.ac.uk>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 X-Sender-Host-Address: 87.81.223.162\r
44 X-QM-Geographic: According to ripencc,\r
45         this message was delivered by a machine in Britain (UK) (GB).\r
46 X-QM-SPAM-Info: Sender has good ham record.  :)\r
47 X-QM-Body-MD5: 83eca9b1039e3fc154bfd85401ef5673 (of first 20000 bytes)\r
48 X-SpamAssassin-Score: -0.1\r
49 X-SpamAssassin-SpamBar: /\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
51         determine if it is\r
52         spam. We require at least 5.0 points to mark a message as spam.\r
53         This message scored -0.1 points.\r
54         Summary of the scoring: \r
55         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
56         provider *      (markwalters1009[at]gmail.com)\r
57         * -0.1 AWL AWL: From: address is in the auto white-list\r
58 X-QM-Scan-Virus: ClamAV says the message is clean\r
59 Cc: Carl Worth <carl.d.worth@intel.com>\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Tue, 29 Apr 2014 10:14:28 -0000\r
73 \r
74 \r
75 This basically looks good to me. I think the docstring to the defcustom needs\r
76 updating to mention functions and I would mildly prefer slightly\r
77 different indentation in one place mentioned below (it may take it over\r
78 80 chars so if you prefer leave it as it is)\r
79 \r
80 On Tue, 29 Apr 2014, Jani Nikula <jani@nikula.org> wrote:\r
81 > Some archives may use a more complicated scheme for referring to\r
82 > messages than just concatenated url and message-id. In particular,\r
83 > patchwork requires a query to translate message-id to a patchwork\r
84 > patch id. Allow functions in notmuch-show-stash-mlarchive-link-alist\r
85 > to facilitate this.\r
86 >\r
87 > For example, one could use something like this for patchwork.\r
88 >\r
89 > (lambda (message-id)\r
90 >   (concat\r
91 >    "http://patchwork.example.com/patch/"\r
92 >    (nth 0\r
93 >       (split-string\r
94 >        (car (last (process-lines "pwclient" "search" "-n" "1"\r
95 >                                  "-m" (concat "<" message-id ">"))))))))\r
96 > ---\r
97 >  emacs/notmuch-show.el |   27 ++++++++++++++++-----------\r
98 >  1 files changed, 16 insertions(+), 11 deletions(-)\r
99 >\r
100 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
101 > index df10d4b..b8bdbb9 100644\r
102 > --- a/emacs/notmuch-show.el\r
103 > +++ b/emacs/notmuch-show.el\r
104 > @@ -183,7 +183,9 @@ each attachment handler is logged in buffers with names beginning\r
105 >  These URIs are concatenated with the current message's\r
106 >  Message-Id in `notmuch-show-stash-mlarchive-link'."\r
107 >    :type '(alist :key-type (string :tag "Name")\r
108 > -             :value-type (string :tag "URL"))\r
109 > +             :value-type (choice\r
110 > +                          (string :tag "URL")\r
111 > +                          (function :tag "Function returning the URL")))\r
112 >    :group 'notmuch-show)\r
113 >  \r
114 >  (defcustom notmuch-show-stash-mlarchive-link-default "Gmane"\r
115 > @@ -2055,16 +2057,19 @@ This presumes that the message is available at the selected Mailing List Archive\r
116 >  If optional argument MLA is non-nil, use the provided key instead of prompting\r
117 >  the user (see `notmuch-show-stash-mlarchive-link-alist')."\r
118 >    (interactive)\r
119 > -  (notmuch-common-do-stash\r
120 > -   (concat (cdr (assoc\r
121 > -              (or mla\r
122 > -                  (let ((completion-ignore-case t))\r
123 > -                    (completing-read\r
124 > -                     "Mailing List Archive: "\r
125 > -                     notmuch-show-stash-mlarchive-link-alist\r
126 > -                     nil t nil nil notmuch-show-stash-mlarchive-link-default)))\r
127 > -              notmuch-show-stash-mlarchive-link-alist))\r
128 > -        (notmuch-show-get-message-id t))))\r
129 > +  (let ((url\r
130 > +      (cdr (assoc\r
131 \r
132 This is the indentation bit: I would prefer the "cdr" on the same line\r
133 as "url".\r
134 \r
135 Best wishes\r
136 \r
137 Mark\r
138 \r
139 \r
140 \r
141 \r
142 > +            (or mla\r
143 > +                (let ((completion-ignore-case t))\r
144 > +                  (completing-read\r
145 > +                   "Mailing List Archive: "\r
146 > +                   notmuch-show-stash-mlarchive-link-alist\r
147 > +                   nil t nil nil notmuch-show-stash-mlarchive-link-default)))\r
148 > +            notmuch-show-stash-mlarchive-link-alist))))\r
149 > +    (notmuch-common-do-stash\r
150 > +     (if (functionp url)\r
151 > +      (funcall url (notmuch-show-get-message-id t))\r
152 > +       (concat url (notmuch-show-get-message-id t))))))\r
153 >  \r
154 >  (defun notmuch-show-stash-mlarchive-link-and-go (&optional mla)\r
155 >    "Copy an ML Archive URI for the current message to the kill-ring and visit it.\r
156 > -- \r
157 > 1.7.2.5\r
158 >\r
159 > _______________________________________________\r
160 > notmuch mailing list\r
161 > notmuch@notmuchmail.org\r
162 > http://notmuchmail.org/mailman/listinfo/notmuch\r