Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 99 / d18032c34f94018376dc0de7a5b14835df2554
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 E2C4F431E82\r
6         for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:44:57 -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: -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 1wNwuBn8WvjY for <notmuch@notmuchmail.org>;\r
17         Sat, 26 Oct 2013 14:44:52 -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 15CC1431FD9\r
22         for <notmuch@notmuchmail.org>; Sat, 26 Oct 2013 14:44:52 -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 1VaBf5-0006FA-NG; Sat, 26 Oct 2013 22:44:48 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] 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 1VaBf5-0003pL-9t; Sat, 26 Oct 2013 22:44:47 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH 0/4] rename pick to tree\r
34 In-Reply-To: <1382822481-26659-1-git-send-email-markwalters1009@gmail.com>\r
35 References: <1382822481-26659-1-git-send-email-markwalters1009@gmail.com>\r
36 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Sat, 26 Oct 2013 22:44:45 +0100\r
39 Message-ID: <87ob6blnaq.fsf@qmul.ac.uk>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain; charset=us-ascii\r
42 X-Sender-Host-Address: 93.97.24.31\r
43 X-QM-SPAM-Info: Sender has good ham record.  :)\r
44 X-QM-Body-MD5: 599c673b1ac3d333106f3ee1fe8a07bc (of first 20000 bytes)\r
45 X-SpamAssassin-Score: 0.0\r
46 X-SpamAssassin-SpamBar: /\r
47 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
48         determine if it is\r
49         spam. We require at least 5.0 points to mark a message as spam.\r
50         This message scored 0.0 points. Summary of the scoring: \r
51         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
52         provider *      (markwalters1009[at]gmail.com)\r
53         *  0.0 AWL AWL: From: address is in the auto white-list\r
54 X-QM-Scan-Virus: ClamAV says the message is clean\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Sat, 26 Oct 2013 21:44:58 -0000\r
68 \r
69 \r
70 Please ignore this version. There were stale files around in my git tree\r
71 which meant it misses the actual key pick->tree move but all still\r
72 worked (and all tests passed)!\r
73 \r
74 I will resend once I have tested on a fresh clone\r
75 \r
76 Best wishes\r
77 \r
78 Mark\r
79 \r
80 \r
81 On Sat, 26 Oct 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
82 > After some discussion on irc it was decided to rename "pick" to\r
83 > "tree".  This series implements this change. Obviously the patch is\r
84 > rather large. I have split it as best as I can: the first moves all of\r
85 > the lisp from the "pick" namespace to the "tree" namespace, the second\r
86 > does the user facing part of the tests (ie what is printed when the\r
87 > test is run), the third updates the auxillary test files (expected\r
88 > outputs) and the final one moves the test itself.\r
89 >\r
90 > I haven't updated the documentation or moved the notmuch-pick\r
91 > directory as that will all be moot once pick moves into mainline.\r
92 >\r
93 > For the main lisp change I piped the pick.el file through sed\r
94 > 's/pick/tree/g'. Then I hand editted the result. The diff from the\r
95 > hand editting is below as that may give the best clue as to any actual\r
96 > changes. (The main one is to use "tree view" rather than just "tree"\r
97 > in docstrings etc.)\r
98 >\r
99 > For any users this will mean they need to update their require\r
100 > 'notmuch-pick to require 'notmuch-tree.\r
101 >\r
102 >\r
103 > Best wishes\r
104 >\r
105 > Mark\r
106 >\r
107 >\r
108 >\r
109 > Mark Walters (4):\r
110 >   contrib: pick: move lisp names from pick to tree\r
111 >   pick: Change the test names and print out for pick tests\r
112 >   pick: rename test outputs from pick to tree\r
113 >   pick: rename test emacs-pick to emacs-tree\r
114 >\r
115 >  contrib/notmuch-pick/notmuch-pick.el               |  668 ++++++++++----------\r
116 >  contrib/notmuch-pick/run-tests.sh                  |    4 +-\r
117 >  contrib/notmuch-pick/test/emacs-pick               |  210 ------\r
118 >  contrib/notmuch-pick/test/emacs-tree               |  210 ++++++\r
119 >  .../pick.expected-output/notmuch-pick-show-window  |   40 --\r
120 >  .../notmuch-pick-single-thread                     |    6 -\r
121 >  .../pick.expected-output/notmuch-pick-tag-inbox    |   53 --\r
122 >  .../notmuch-pick-tag-inbox-tagged                  |   53 --\r
123 >  .../notmuch-pick-tag-inbox-thread-tagged           |   53 --\r
124 >  .../tree.expected-output/notmuch-tree-show-window  |   40 ++\r
125 >  .../notmuch-tree-single-thread                     |    6 +\r
126 >  .../tree.expected-output/notmuch-tree-tag-inbox    |   53 ++\r
127 >  .../notmuch-tree-tag-inbox-tagged                  |   53 ++\r
128 >  .../notmuch-tree-tag-inbox-thread-tagged           |   53 ++\r
129 >  14 files changed, 751 insertions(+), 751 deletions(-)\r
130 >  delete mode 100755 contrib/notmuch-pick/test/emacs-pick\r
131 >  create mode 100755 contrib/notmuch-pick/test/emacs-tree\r
132 >  delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-show-window\r
133 >  delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-single-thread\r
134 >  delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox\r
135 >  delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-tagged\r
136 >  delete mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged\r
137 >  create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-show-window\r
138 >  create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-single-thread\r
139 >  create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox\r
140 >  create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox-tagged\r
141 >  create mode 100644 contrib/notmuch-pick/test/tree.expected-output/notmuch-tree-tag-inbox-thread-tagged\r
142 >\r
143 > From 338fd0c981ef9ed4d5b4f7880b1e21826f7d182c Mon Sep 17 00:00:00 2001\r
144 > From: Mark Walters <markwalters1009@gmail.com>\r
145 > Date: Sat, 26 Oct 2013 13:48:04 +0100\r
146 > Subject: [PATCH] by hand\r
147 >\r
148 > ---\r
149 >  contrib/notmuch-pick/notmuch-pick.el |   34 +++++++++++++++++-----------------\r
150 >  1 files changed, 17 insertions(+), 17 deletions(-)\r
151 >\r
152 > diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
153 > index aaadad4..3b0cc0e 100644\r
154 > --- a/contrib/notmuch-pick/notmuch-pick.el\r
155 > +++ b/contrib/notmuch-pick/notmuch-pick.el\r
156 > @@ -60,7 +60,7 @@\r
157 >      ("authors" . "%-20s")\r
158 >      ((("tree" . "%s")("subject" . "%s")) ." %-54s ")\r
159 >      ("tags" . "(%s)"))\r
160 > -  "Result formatting for Pick. Supported fields are: date,\r
161 > +  "Result formatting for Tree view. Supported fields are: date,\r
162 >          authors, subject, tree, tags.  Tree means the thread tree\r
163 >          box graphics. The field may also be a list in which case\r
164 >          the formatting rules are applied recursively and then the\r
165 > @@ -175,8 +175,8 @@ Note the author string should not contain\r
166 >    "The window of the message pane.\r
167 >  \r
168 >  It is set in both the tree buffer and the child show buffer. It\r
169 > -is used to try and close the message pane when quitting tree or\r
170 > -the child show buffer.")\r
171 > +is used to try and close the message pane when quitting tree view\r
172 > +or the child show buffer.")\r
173 >  (make-variable-buffer-local 'notmuch-tree-message-window)\r
174 >  (put 'notmuch-tree-message-window 'permanent-local t)\r
175 >  \r
176 > @@ -252,7 +252,7 @@ FUNC."\r
177 >      (define-key map "R" (notmuch-tree-close-message-pane-and #'notmuch-show-reply))\r
178 >      (define-key map "V" (notmuch-tree-close-message-pane-and #'notmuch-show-view-raw-message))\r
179 >  \r
180 > -    ;; The main tree bindings\r
181 > +    ;; The main tree view bindings\r
182 >      (define-key map (kbd "RET") 'notmuch-tree-show-message)\r
183 >      (define-key map [mouse-1] 'notmuch-tree-show-message)\r
184 >      (define-key map "x" 'notmuch-tree-quit)\r
185 > @@ -287,7 +287,7 @@ Some useful entries are:\r
186 >  ;; XXX This should really be a lib function but we are trying to\r
187 >  ;; reduce impact on the code base.\r
188 >  (defun notmuch-show-get-prop (prop &optional props)\r
189 > -  "This is a tree overridden version of notmuch-show-get-prop\r
190 > +  "This is a tree view overridden version of notmuch-show-get-prop\r
191 >  \r
192 >  It gets property PROP from PROPS or, if PROPS is nil, the current\r
193 >  message in either tree or show. This means that several functions\r
194 > @@ -391,10 +391,10 @@ Does NOT change the database."\r
195 >     (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-")))\r
196 >    (notmuch-tree-tag tag-changes))\r
197 >  \r
198 > -;; The next two functions close the message window before searching or\r
199 > -;; treeing but they do so after the user has entered the query (in\r
200 > -;; case the user was basing the query on something in the message\r
201 > -;; window).\r
202 > +;; The next two functions close the message window before calling\r
203 > +;; notmuch-search or notmuch-tree but they do so after the user has\r
204 > +;; entered the query (in case the user was basing the query on\r
205 > +;; something in the message window).\r
206 >  \r
207 >  (defun notmuch-tree-to-search ()\r
208 >    "Run \"notmuch search\" with the given `query' and display results."\r
209 > @@ -404,9 +404,9 @@ Does NOT change the database."\r
210 >      (notmuch-search query)))\r
211 >  \r
212 >  (defun notmuch-tree-to-tree ()\r
213 > -  "Run a query and display results in experimental notmuch-tree mode"\r
214 > +  "Run a query and display results in Tree view"\r
215 >    (interactive)\r
216 > -  (let ((query (notmuch-read-query "Notmuch tree: ")))\r
217 > +  (let ((query (notmuch-read-query "Notmuch tree view search: ")))\r
218 >      (notmuch-tree-close-message-window)\r
219 >      (notmuch-tree query)))\r
220 >  \r
221 > @@ -856,7 +856,7 @@ Complete list of currently available key bindings:\r
222 >                     (atbob (bobp)))\r
223 >                 (goto-char (point-max))\r
224 >                 (if (eq status 'signal)\r
225 > -                   (insert "Incomplete search results (tree process was killed).\n"))\r
226 > +                   (insert "Incomplete search results (tree view process was killed).\n"))\r
227 >                 (when (eq status 'exit)\r
228 >                   (insert "End of search results.")\r
229 >                   (unless (= exit-status 0)\r
230 > @@ -864,7 +864,7 @@ Complete list of currently available key bindings:\r
231 >                   (insert "\n")))))))))\r
232 >  \r
233 >  (defun notmuch-tree-process-filter (proc string)\r
234 > -  "Process and filter the output of \"notmuch show\" (for tree)"\r
235 > +  "Process and filter the output of \"notmuch show\" for tree view"\r
236 >    (let ((results-buf (process-buffer proc))\r
237 >          (parse-buf (process-get proc 'parse-buf))\r
238 >          (inhibit-read-only t)\r
239 > @@ -880,7 +880,7 @@ Complete list of currently available key bindings:\r
240 >                                        results-buf)))))\r
241 >  \r
242 >  (defun notmuch-tree-worker (basic-query &optional query-context target open-target)\r
243 > -  "Insert the actual tree search in the current buffer.\r
244 > +  "Insert the tree view of the search in the current buffer.\r
245 >  \r
246 >  This is is a helper function for notmuch-tree. The arguments are\r
247 >  the same as for the function notmuch-tree."\r
248 > @@ -921,13 +921,13 @@ The arguments are:\r
249 >        is QUERY and QUERY-CONTEXT unless that does not match any messages\r
250 >        in which case we fall back to just QUERY.\r
251 >    TARGET: A message ID (with the id: prefix) that will be made\r
252 > -      current if it appears in the tree results.\r
253 > -  BUFFER-NAME: the name of the buffer to show the tree tree. If\r
254 > +      current if it appears in the tree view results.\r
255 > +  BUFFER-NAME: the name of the buffer to display the tree view. If\r
256 >        it is nil \"*notmuch-tree\" followed by QUERY is used.\r
257 >    OPEN-TARGET: If TRUE open the target message in the message pane."\r
258 >    (interactive)\r
259 >    (if (null query)\r
260 > -      (setq query (notmuch-read-query "Notmuch tree: ")))\r
261 > +      (setq query (notmuch-read-query "Notmuch tree view search: ")))\r
262 >    (let ((buffer (get-buffer-create (generate-new-buffer-name\r
263 >                                   (or buffer-name\r
264 >                                       (concat "*notmuch-tree-" query "*")))))\r
265 > -- \r
266 > 1.7.9.1\r