Re: [PATCH] create .mailmap file (for git shortlog/blame)
[notmuch-archives.git] / 41 / cbed63b0a31dd9cd1d51c5eb9c819cb3d00a23
1 Return-Path: <too@guru.guru-group.fi>\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 22A81429E30\r
6         for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 01:04:27 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id z+mMWhKe37qs for <notmuch@notmuchmail.org>;\r
16         Mon, 16 Jan 2012 01:04:23 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 3609A431FC0\r
19         for <notmuch@notmuchmail.org>; Mon, 16 Jan 2012 01:04:23 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 03E8E68056; Mon, 16 Jan 2012 11:04:27 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: <notmuch@notmuchmail.org>\r
24 Subject: [PATCH 2/3] emacs: whitespace-cleanup and indent-region for\r
25         emacs/*.el files\r
26 Date: Mon, 16 Jan 2012 11:04:15 +0200\r
27 Message-Id: <1326704656-26102-2-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.6.1\r
29 In-Reply-To: <1326704656-26102-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <cun7h0v7ete.fsf@hotblack-desiato.hh.sledj.net>\r
31         <1326704656-26102-1-git-send-email-tomi.ollila@iki.fi>\r
32 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Mon, 16 Jan 2012 09:04:27 -0000\r
46 \r
47 Run (whitespace-cleanup) and (indent-region (point-min) (point-max))\r
48 to all elisp files in emacs/ which:\r
49 \r
50   removed trailing whitespace and empty lines at the end of file\r
51   removed spaces before tab (if any)\r
52   converted 8 spaces to tabs in the beginning of line\r
53   changed amount of whitespace in the beginning of lines\r
54 ---\r
55  emacs/coolj.el               |   16 ++--\r
56  emacs/notmuch-address.el     |    2 +-\r
57  emacs/notmuch-hello.el       |   40 +++++-----\r
58  emacs/notmuch-lib.el         |    7 +-\r
59  emacs/notmuch-maildir-fcc.el |   57 ++++++++--------\r
60  emacs/notmuch-mua.el         |    2 +-\r
61  emacs/notmuch-query.el       |    6 +-\r
62  emacs/notmuch-show.el        |  158 +++++++++++++++++++++---------------------\r
63  emacs/notmuch-wash.el        |    2 +-\r
64  emacs/notmuch.el             |  110 +++++++++++++++---------------\r
65  10 files changed, 199 insertions(+), 201 deletions(-)\r
66 \r
67 diff --git a/emacs/coolj.el b/emacs/coolj.el\r
68 index 60af60a..173eb2f 100644\r
69 --- a/emacs/coolj.el\r
70 +++ b/emacs/coolj.el\r
71 @@ -108,11 +108,11 @@ If the line should not be broken, return nil; point remains on the\r
72  line."\r
73    (move-to-column fill-column)\r
74    (if (and (re-search-forward "[^ ]" (line-end-position) 1)\r
75 -           (> (current-column) fill-column))\r
76 +          (> (current-column) fill-column))\r
77        ;; This line is too long.  Can we break it?\r
78        (or (coolj-find-break-backward prefix)\r
79 -          (progn (move-to-column fill-column)\r
80 -                 (coolj-find-break-forward)))))\r
81 +         (progn (move-to-column fill-column)\r
82 +                (coolj-find-break-forward)))))\r
83  \r
84  (defun coolj-find-break-backward (prefix)\r
85    "Move point backward to the first available breakpoint and return t.\r
86 @@ -135,11 +135,11 @@ If no breakpoint is found, return nil."\r
87  If no break point is found, return nil."\r
88    (and (search-forward " " (line-end-position) 1)\r
89         (progn (skip-chars-forward " " (line-end-position))\r
90 -              (null (eolp)))\r
91 +             (null (eolp)))\r
92         (if (and fill-nobreak-predicate\r
93 -                (run-hook-with-args-until-success\r
94 -                 'fill-nobreak-predicate))\r
95 -           (coolj-find-break-forward)\r
96 -         t)))\r
97 +               (run-hook-with-args-until-success\r
98 +                'fill-nobreak-predicate))\r
99 +          (coolj-find-break-forward)\r
100 +        t)))\r
101  \r
102  (provide 'coolj)\r
103 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
104 index 8eba7a0..d702d65 100644\r
105 --- a/emacs/notmuch-address.el\r
106 +++ b/emacs/notmuch-address.el\r
107 @@ -32,7 +32,7 @@ line."\r
108  \r
109  (defvar notmuch-address-message-alist-member\r
110    '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"\r
111 -             . notmuch-address-expand-name))\r
112 +    . notmuch-address-expand-name))\r
113  \r
114  (defvar notmuch-address-history nil)\r
115  \r
116 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
117 index 93e5032..31287a7 100644\r
118 --- a/emacs/notmuch-hello.el\r
119 +++ b/emacs/notmuch-hello.el\r
120 @@ -171,10 +171,10 @@ International Bureau of Weights and Measures."\r
121        (setq n (/ n 1000)))\r
122      (setq result (or result '(0)))\r
123      (apply #'concat\r
124 -     (number-to-string (car result))\r
125 -     (mapcar (lambda (elem)\r
126 -             (format "%s%03d" notmuch-hello-thousands-separator elem))\r
127 -            (cdr result)))))\r
128 +          (number-to-string (car result))\r
129 +          (mapcar (lambda (elem)\r
130 +                    (format "%s%03d" notmuch-hello-thousands-separator elem))\r
131 +                  (cdr result)))))\r
132  \r
133  (defun notmuch-hello-trim (search)\r
134    "Trim whitespace."\r
135 @@ -361,19 +361,19 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
136  (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)\r
137  \r
138  (defun notmuch-hello-mode ()\r
139 - "Major mode for convenient notmuch navigation. This is your entry portal into notmuch.\r
140 +  "Major mode for convenient notmuch navigation. This is your entry portal into notmuch.\r
141  \r
142  Complete list of currently available key bindings:\r
143  \r
144  \\{notmuch-hello-mode-map}"\r
145 - (interactive)\r
146 - (kill-all-local-variables)\r
147 - (use-local-map notmuch-hello-mode-map)\r
148 - (setq major-mode 'notmuch-hello-mode\r
149 -       mode-name "notmuch-hello")\r
150 - (run-mode-hooks 'notmuch-hello-mode-hook)\r
151 - ;;(setq buffer-read-only t)\r
152 -)\r
153 +  (interactive)\r
154 +  (kill-all-local-variables)\r
155 +  (use-local-map notmuch-hello-mode-map)\r
156 +  (setq major-mode 'notmuch-hello-mode\r
157 +       mode-name "notmuch-hello")\r
158 +  (run-mode-hooks 'notmuch-hello-mode-hook)\r
159 +  ;;(setq buffer-read-only t)\r
160 +  )\r
161  \r
162  (defun notmuch-hello-generate-tag-alist ()\r
163    "Return an alist from tags to queries to display in the all-tags section."\r
164 @@ -402,19 +402,19 @@ Complete list of currently available key bindings:\r
165    ;; Jump through a hoop to get this value from the deprecated variable\r
166    ;; name (`notmuch-folders') or from the default value.\r
167    (if (not notmuch-saved-searches)\r
168 -    (setq notmuch-saved-searches (notmuch-saved-searches)))\r
169 +      (setq notmuch-saved-searches (notmuch-saved-searches)))\r
170  \r
171    (if no-display\r
172        (set-buffer "*notmuch-hello*")\r
173      (switch-to-buffer "*notmuch-hello*"))\r
174  \r
175    (let ((target (if (widget-at)\r
176 -                  (widget-value (widget-at))\r
177 -                (condition-case nil\r
178 -                    (progn\r
179 -                      (widget-forward 1)\r
180 -                      (widget-value (widget-at)))\r
181 -                  (error nil))))\r
182 +                   (widget-value (widget-at))\r
183 +                 (condition-case nil\r
184 +                     (progn\r
185 +                       (widget-forward 1)\r
186 +                       (widget-value (widget-at)))\r
187 +                   (error nil))))\r
188         (inhibit-read-only t))\r
189  \r
190      ;; Delete all editable widget fields.  Editable widget fields are\r
191 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
192 index 00ed589..7b63348 100644\r
193 --- a/emacs/notmuch-lib.el\r
194 +++ b/emacs/notmuch-lib.el\r
195 @@ -73,7 +73,7 @@ the user hasn't set this variable with the old or new value."\r
196    ;; Trim off the trailing newline\r
197    (substring (shell-command-to-string\r
198               (concat notmuch-command " config get " item))\r
199 -             0 -1))\r
200 +            0 -1))\r
201  \r
202  (defun notmuch-database-path ()\r
203    "Return the database.path value from the notmuch configuration."\r
204 @@ -110,7 +110,7 @@ the user hasn't set this variable with the old or new value."\r
205    (let (out)\r
206      (while list\r
207        (when (funcall predicate (car list))\r
208 -        (push (car list) out))\r
209 +       (push (car list) out))\r
210        (setq list (cdr list)))\r
211      (nreverse out)))\r
212  \r
213 @@ -143,7 +143,7 @@ The result is a new function which does the same as FUN, except that\r
214  the first N arguments are fixed at the values with which this function\r
215  was called."\r
216     (lexical-let ((fun fun) (args1 args))\r
217 -     (lambda (&rest args2) (apply fun (append args1 args2))))))\r
218 +               (lambda (&rest args2) (apply fun (append args1 args2))))))\r
219  \r
220  (compile-on-emacs-prior-to-23\r
221   (defun mouse-event-p (object)\r
222 @@ -156,4 +156,3 @@ was called."\r
223  (make-variable-buffer-local 'notmuch-show-process-crypto)\r
224  \r
225  (provide 'notmuch-lib)\r
226 -\r
227 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
228 index 6fbf82d..707e5a2 100644\r
229 --- a/emacs/notmuch-maildir-fcc.el\r
230 +++ b/emacs/notmuch-maildir-fcc.el\r
231 @@ -24,7 +24,7 @@\r
232  (defvar notmuch-maildir-fcc-count 0)\r
233  \r
234  (defcustom notmuch-fcc-dirs "sent"\r
235 - "Determines the maildir directory in which to save outgoing mail.\r
236 +  "Determines the maildir directory in which to save outgoing mail.\r
237  \r
238  Three types of values are permitted:\r
239  \r
240 @@ -51,24 +51,24 @@ the database.path option in the notmuch configuration file).\r
241  You will be prompted to create the directory if it does not exist\r
242  yet when sending a mail."\r
243  \r
244 - :require 'notmuch-fcc-initialization\r
245 - :group 'notmuch\r
246 - :type '(choice\r
247 -        (const :tag "No FCC header" nil)\r
248 -        (string :tag "A single folder")\r
249 -        (repeat :tag "A folder based on the From header"\r
250 -                (cons regexp (string :tag "Folder")))))\r
251 +  :require 'notmuch-fcc-initialization\r
252 +  :group 'notmuch\r
253 +  :type '(choice\r
254 +         (const :tag "No FCC header" nil)\r
255 +         (string :tag "A single folder")\r
256 +         (repeat :tag "A folder based on the From header"\r
257 +                 (cons regexp (string :tag "Folder")))))\r
258  \r
259  (defun notmuch-fcc-initialization ()\r
260    "If notmuch-fcc-directories is set,\r
261     hook them into the message-fcc-handler-function"\r
262 -    ;; Set up the message-fcc-handler to move mails to the maildir in Fcc\r
263 -    ;; The parameter is set to mark messages as "seen"\r
264 -    (setq message-fcc-handler-function\r
265 -          (lambda (destdir)\r
266 -           (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))\r
267 -    ;; add a hook to actually insert the Fcc header when sending\r
268 -    (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup))\r
269 +  ;; Set up the message-fcc-handler to move mails to the maildir in Fcc\r
270 +  ;; The parameter is set to mark messages as "seen"\r
271 +  (setq message-fcc-handler-function\r
272 +       (lambda (destdir)\r
273 +         (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))\r
274 +  ;; add a hook to actually insert the Fcc header when sending\r
275 +  (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup))\r
276  \r
277  (defun notmuch-fcc-header-setup ()\r
278    "Add an Fcc header to the current message buffer.\r
279 @@ -116,7 +116,7 @@ will NOT be removed or replaced."\r
280                 (if (= (elt subdir 0) ?/)\r
281                     subdir\r
282                   (concat (notmuch-database-path) "/" subdir)))))\r
283 -      \r
284 +\r
285        ;; finally test if fcc points to a valid maildir\r
286        (let ((fcc-header (message-field-value "Fcc")))\r
287         (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)\r
288 @@ -128,7 +128,7 @@ will NOT be removed or replaced."\r
289                  (notmuch-maildir-fcc-create-maildir fcc-header))\r
290                 (t\r
291                  (error "Message not sent"))))))))\r
292\r
293 +\r
294  (defun notmuch-maildir-fcc-host-fixer (hostname)\r
295    (replace-regexp-in-string "/\\|:"\r
296                             (lambda (s)\r
297 @@ -140,17 +140,17 @@ will NOT be removed or replaced."\r
298                             t))\r
299  \r
300  (defun notmuch-maildir-fcc-make-uniq-maildir-id ()\r
301 -   (let* ((ct (current-time))\r
302 -         (timeid (+ (* (car ct) 65536) (cadr ct)))\r
303 -         (microseconds (car (cdr (cdr ct))))\r
304 -         (hostname (notmuch-maildir-fcc-host-fixer system-name)))\r
305 -     (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))\r
306 -     (format "%d.%d_%d_%d.%s"\r
307 -            timeid\r
308 -            (emacs-pid)\r
309 -            microseconds\r
310 -            notmuch-maildir-fcc-count\r
311 -            hostname)))\r
312 +  (let* ((ct (current-time))\r
313 +        (timeid (+ (* (car ct) 65536) (cadr ct)))\r
314 +        (microseconds (car (cdr (cdr ct))))\r
315 +        (hostname (notmuch-maildir-fcc-host-fixer system-name)))\r
316 +    (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))\r
317 +    (format "%d.%d_%d_%d.%s"\r
318 +           timeid\r
319 +           (emacs-pid)\r
320 +           microseconds\r
321 +           notmuch-maildir-fcc-count\r
322 +           hostname)))\r
323  \r
324  (defun notmuch-maildir-fcc-dir-is-maildir-p (dir)\r
325    (and (file-exists-p (concat dir "/cur/"))\r
326 @@ -216,4 +216,3 @@ return t if successful, and nil otherwise."\r
327  \r
328  (notmuch-fcc-initialization)\r
329  (provide 'notmuch-maildir-fcc)\r
330 -\r
331 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
332 index d8ab822..922fed1 100644\r
333 --- a/emacs/notmuch-mua.el\r
334 +++ b/emacs/notmuch-mua.el\r
335 @@ -109,7 +109,7 @@ list."\r
336      ;; if one is present\r
337      (goto-char (point-max))\r
338      (if (re-search-backward message-signature-separator nil t)\r
339 -         (forward-line -1)\r
340 +       (forward-line -1)\r
341        (goto-char (point-max)))\r
342      (insert body)\r
343      (push-mark))\r
344 diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el\r
345 index d66baea..b5254a2 100644\r
346 --- a/emacs/notmuch-query.el\r
347 +++ b/emacs/notmuch-query.el\r
348 @@ -49,9 +49,9 @@ is a possibly empty forest of replies.\r
349    "private function to do the actual mapping and flattening"\r
350    (apply 'append\r
351          (mapcar\r
352 -          (lambda (tree)\r
353 -            (funcall mapper function tree))\r
354 -          seq)))\r
355 +         (lambda (tree)\r
356 +           (funcall mapper function tree))\r
357 +         seq)))\r
358  \r
359  (defun notmuch-query-map-threads (fn threads)\r
360    "apply FN to every thread in  THREADS. Flatten results to a list.\r
361 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
362 index ef3c076..8ea8df8 100644\r
363 --- a/emacs/notmuch-show.el\r
364 +++ b/emacs/notmuch-show.el\r
365 @@ -115,9 +115,9 @@ indentation."\r
366    `(save-excursion\r
367       (let ((id (notmuch-show-get-message-id)))\r
368         (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))\r
369 -         (with-current-buffer buf\r
370 -           (call-process notmuch-command nil t nil "show" "--format=raw" id)\r
371 -           ,@body)\r
372 +        (with-current-buffer buf\r
373 +          (call-process notmuch-command nil t nil "show" "--format=raw" id)\r
374 +          ,@body)\r
375          (kill-buffer buf)))))\r
376  \r
377  (defun notmuch-show-view-all-mime-parts ()\r
378 @@ -138,28 +138,28 @@ indentation."\r
379                                   ("multipart/alternative" ignore identity)\r
380                                   ("multipart/mixed" ignore identity)\r
381                                   ("multipart/related" ignore identity)\r
382 -                                )))\r
383 +                                 )))\r
384       (mm-display-parts (mm-dissect-buffer)))))\r
385  \r
386  (defun notmuch-foreach-mime-part (function mm-handle)\r
387    (cond ((stringp (car mm-handle))\r
388 -         (dolist (part (cdr mm-handle))\r
389 -           (notmuch-foreach-mime-part function part)))\r
390 -        ((bufferp (car mm-handle))\r
391 -         (funcall function mm-handle))\r
392 -        (t (dolist (part mm-handle)\r
393 -             (notmuch-foreach-mime-part function part)))))\r
394 +        (dolist (part (cdr mm-handle))\r
395 +          (notmuch-foreach-mime-part function part)))\r
396 +       ((bufferp (car mm-handle))\r
397 +        (funcall function mm-handle))\r
398 +       (t (dolist (part mm-handle)\r
399 +            (notmuch-foreach-mime-part function part)))))\r
400  \r
401  (defun notmuch-count-attachments (mm-handle)\r
402    (let ((count 0))\r
403      (notmuch-foreach-mime-part\r
404       (lambda (p)\r
405         (let ((disposition (mm-handle-disposition p)))\r
406 -         (and (listp disposition)\r
407 -              (or (equal (car disposition) "attachment")\r
408 -                  (and (equal (car disposition) "inline")\r
409 -                       (assq 'filename disposition)))\r
410 -              (incf count))))\r
411 +        (and (listp disposition)\r
412 +             (or (equal (car disposition) "attachment")\r
413 +                 (and (equal (car disposition) "inline")\r
414 +                      (assq 'filename disposition)))\r
415 +             (incf count))))\r
416       mm-handle)\r
417      count))\r
418  \r
419 @@ -168,13 +168,13 @@ indentation."\r
420     (lambda (p)\r
421       (let ((disposition (mm-handle-disposition p)))\r
422         (and (listp disposition)\r
423 -            (or (equal (car disposition) "attachment")\r
424 -                (and (equal (car disposition) "inline")\r
425 -                     (assq 'filename disposition)))\r
426 -            (or (not queryp)\r
427 -                (y-or-n-p\r
428 -                 (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
429 -            (mm-save-part p))))\r
430 +           (or (equal (car disposition) "attachment")\r
431 +               (and (equal (car disposition) "inline")\r
432 +                    (assq 'filename disposition)))\r
433 +           (or (not queryp)\r
434 +               (y-or-n-p\r
435 +                (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
436 +           (mm-save-part p))))\r
437     mm-handle))\r
438  \r
439  (defun notmuch-show-save-attachments ()\r
440 @@ -227,21 +227,21 @@ indentation."\r
441    "Try to clean a single email ADDRESS for display.  Return\r
442  unchanged ADDRESS if parsing fails."\r
443    (condition-case nil\r
444 -    (let* ((parsed (mail-header-parse-address address))\r
445 -          (address (car parsed))\r
446 -          (name (cdr parsed)))\r
447 -      ;; Remove double quotes. They might be required during transport,\r
448 -      ;; but we don't need to see them.\r
449 -      (when name\r
450 -        (setq name (replace-regexp-in-string "\"" "" name)))\r
451 -      ;; If the address is 'foo@bar.com <foo@bar.com>' then show just\r
452 -      ;; 'foo@bar.com'.\r
453 -      (when (string= name address)\r
454 -        (setq name nil))\r
455 -\r
456 -      (if (not name)\r
457 -        address\r
458 -        (concat name " <" address ">")))\r
459 +      (let* ((parsed (mail-header-parse-address address))\r
460 +            (address (car parsed))\r
461 +            (name (cdr parsed)))\r
462 +       ;; Remove double quotes. They might be required during transport,\r
463 +       ;; but we don't need to see them.\r
464 +       (when name\r
465 +         (setq name (replace-regexp-in-string "\"" "" name)))\r
466 +       ;; If the address is 'foo@bar.com <foo@bar.com>' then show just\r
467 +       ;; 'foo@bar.com'.\r
468 +       (when (string= name address)\r
469 +         (setq name nil))\r
470 +\r
471 +       (if (not name)\r
472 +           address\r
473 +         (concat name " <" address ">")))\r
474      (error address)))\r
475  \r
476  (defun notmuch-show-insert-headerline (headers date tags depth)\r
477 @@ -380,9 +380,9 @@ current buffer, if possible."\r
478    "Instruct w3m how to retrieve content from a \"related\" part of a message."\r
479    (interactive)\r
480    (if (boundp 'w3m-cid-retrieve-function-alist)\r
481 -    (unless (assq 'notmuch-show-mode w3m-cid-retrieve-function-alist)\r
482 -      (push (cons 'notmuch-show-mode 'notmuch-show-w3m-cid-retrieve)\r
483 -           w3m-cid-retrieve-function-alist)))\r
484 +      (unless (assq 'notmuch-show-mode w3m-cid-retrieve-function-alist)\r
485 +       (push (cons 'notmuch-show-mode 'notmuch-show-w3m-cid-retrieve)\r
486 +             w3m-cid-retrieve-function-alist)))\r
487    (setq mm-inline-text-html-with-images t))\r
488  \r
489  (defvar w3m-current-buffer) ;; From `w3m.el'.\r
490 @@ -752,7 +752,7 @@ current buffer, if possible."\r
491      (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end))\r
492  \r
493      (let ((headers-overlay (make-overlay headers-start headers-end))\r
494 -          (invis-specs (list headers-invis-spec message-invis-spec)))\r
495 +         (invis-specs (list headers-invis-spec message-invis-spec)))\r
496        (overlay-put headers-overlay 'invisible invis-specs)\r
497        (overlay-put headers-overlay 'priority 10))\r
498      (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec)\r
499 @@ -919,39 +919,39 @@ thread id.  If a prefix is given, crypto processing is toggled."\r
500  (fset 'notmuch-show-stash-map notmuch-show-stash-map)\r
501  \r
502  (defvar notmuch-show-mode-map\r
503 -      (let ((map (make-sparse-keymap)))\r
504 -       (define-key map "?" 'notmuch-help)\r
505 -       (define-key map "q" 'notmuch-kill-this-buffer)\r
506 -       (define-key map (kbd "<C-tab>") 'widget-backward)\r
507 -       (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
508 -       (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
509 -       (define-key map (kbd "TAB") 'notmuch-show-next-button)\r
510 -       (define-key map "s" 'notmuch-search)\r
511 -       (define-key map "m" 'notmuch-mua-new-mail)\r
512 -       (define-key map "f" 'notmuch-show-forward-message)\r
513 -       (define-key map "r" 'notmuch-show-reply-sender)\r
514 -       (define-key map "R" 'notmuch-show-reply)\r
515 -       (define-key map "|" 'notmuch-show-pipe-message)\r
516 -       (define-key map "w" 'notmuch-show-save-attachments)\r
517 -       (define-key map "V" 'notmuch-show-view-raw-message)\r
518 -       (define-key map "v" 'notmuch-show-view-all-mime-parts)\r
519 -       (define-key map "c" 'notmuch-show-stash-map)\r
520 -       (define-key map "=" 'notmuch-show-refresh-view)\r
521 -       (define-key map "h" 'notmuch-show-toggle-headers)\r
522 -       (define-key map "-" 'notmuch-show-remove-tag)\r
523 -       (define-key map "+" 'notmuch-show-add-tag)\r
524 -       (define-key map "x" 'notmuch-show-archive-thread-then-exit)\r
525 -       (define-key map "a" 'notmuch-show-archive-thread)\r
526 -       (define-key map "N" 'notmuch-show-next-message)\r
527 -       (define-key map "P" 'notmuch-show-previous-message)\r
528 -       (define-key map "n" 'notmuch-show-next-open-message)\r
529 -       (define-key map "p" 'notmuch-show-previous-open-message)\r
530 -       (define-key map (kbd "DEL") 'notmuch-show-rewind)\r
531 -       (define-key map " " 'notmuch-show-advance-and-archive)\r
532 -       (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)\r
533 -       (define-key map (kbd "RET") 'notmuch-show-toggle-message)\r
534 -       map)\r
535 -      "Keymap for \"notmuch show\" buffers.")\r
536 +  (let ((map (make-sparse-keymap)))\r
537 +    (define-key map "?" 'notmuch-help)\r
538 +    (define-key map "q" 'notmuch-kill-this-buffer)\r
539 +    (define-key map (kbd "<C-tab>") 'widget-backward)\r
540 +    (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
541 +    (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
542 +    (define-key map (kbd "TAB") 'notmuch-show-next-button)\r
543 +    (define-key map "s" 'notmuch-search)\r
544 +    (define-key map "m" 'notmuch-mua-new-mail)\r
545 +    (define-key map "f" 'notmuch-show-forward-message)\r
546 +    (define-key map "r" 'notmuch-show-reply-sender)\r
547 +    (define-key map "R" 'notmuch-show-reply)\r
548 +    (define-key map "|" 'notmuch-show-pipe-message)\r
549 +    (define-key map "w" 'notmuch-show-save-attachments)\r
550 +    (define-key map "V" 'notmuch-show-view-raw-message)\r
551 +    (define-key map "v" 'notmuch-show-view-all-mime-parts)\r
552 +    (define-key map "c" 'notmuch-show-stash-map)\r
553 +    (define-key map "=" 'notmuch-show-refresh-view)\r
554 +    (define-key map "h" 'notmuch-show-toggle-headers)\r
555 +    (define-key map "-" 'notmuch-show-remove-tag)\r
556 +    (define-key map "+" 'notmuch-show-add-tag)\r
557 +    (define-key map "x" 'notmuch-show-archive-thread-then-exit)\r
558 +    (define-key map "a" 'notmuch-show-archive-thread)\r
559 +    (define-key map "N" 'notmuch-show-next-message)\r
560 +    (define-key map "P" 'notmuch-show-previous-message)\r
561 +    (define-key map "n" 'notmuch-show-next-open-message)\r
562 +    (define-key map "p" 'notmuch-show-previous-open-message)\r
563 +    (define-key map (kbd "DEL") 'notmuch-show-rewind)\r
564 +    (define-key map " " 'notmuch-show-advance-and-archive)\r
565 +    (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)\r
566 +    (define-key map (kbd "RET") 'notmuch-show-toggle-message)\r
567 +    map)\r
568 +  "Keymap for \"notmuch show\" buffers.")\r
569  (fset 'notmuch-show-mode-map notmuch-show-mode-map)\r
570  \r
571  (defun notmuch-show-mode ()\r
572 @@ -1214,9 +1214,9 @@ any effects from previous calls to\r
573    (let ((start-of-message (notmuch-show-message-top))\r
574         (start-of-window (window-start)))\r
575      (cond\r
576 -      ;; Either this message is properly aligned with the start of the\r
577 -      ;; window or the start of this message is not visible on the\r
578 -      ;; screen - scroll.\r
579 +     ;; Either this message is properly aligned with the start of the\r
580 +     ;; window or the start of this message is not visible on the\r
581 +     ;; screen - scroll.\r
582       ((or (= start-of-message start-of-window)\r
583           (< start-of-message start-of-window))\r
584        (scroll-down)\r
585 @@ -1310,7 +1310,7 @@ than only the current message."\r
586    (interactive "P\nsPipe message to command: ")\r
587    (let (shell-command)\r
588      (if entire-thread\r
589 -       (setq shell-command \r
590 +       (setq shell-command\r
591               (concat notmuch-command " show --format=mbox "\r
592                       (shell-quote-argument\r
593                        (mapconcat 'identity (notmuch-show-get-message-ids-for-open-messages) " OR "))\r
594 @@ -1338,7 +1338,7 @@ currently present and return the result."\r
595      (mapc (lambda (add-tag)\r
596             (unless (member add-tag current-tags)\r
597               (setq result-tags (push add-tag result-tags))))\r
598 -           add-tags)\r
599 +         add-tags)\r
600      (sort result-tags 'string<)))\r
601  \r
602  (defun notmuch-show-del-tags-worker (current-tags del-tags)\r
603 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el\r
604 index 5c1e830..63172df 100644\r
605 --- a/emacs/notmuch-wash.el\r
606 +++ b/emacs/notmuch-wash.el\r
607 @@ -315,7 +315,7 @@ style prefix in SUBJECT, or nil if such a prefix can't be found."\r
608    (when (string-match\r
609          "^ *\\(\\[[^]]*\\] *\\)*\\[[^]]*?\\([0-9]+\\)/[0-9]+[^]]*\\].*"\r
610          subject)\r
611 -      (string-to-number (substring subject (match-beginning 2) (match-end 2)))))\r
612 +    (string-to-number (substring subject (match-beginning 2) (match-end 2)))))\r
613  \r
614  (defun notmuch-wash-subject-to-patch-filename (subject)\r
615    "Convert a patch mail SUBJECT into a filename.\r
616 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
617 index 8957de5..c94f522 100644\r
618 --- a/emacs/notmuch.el\r
619 +++ b/emacs/notmuch.el\r
620 @@ -84,23 +84,23 @@ For example:\r
621  \r
622  (defun notmuch-foreach-mime-part (function mm-handle)\r
623    (cond ((stringp (car mm-handle))\r
624 -         (dolist (part (cdr mm-handle))\r
625 -           (notmuch-foreach-mime-part function part)))\r
626 -        ((bufferp (car mm-handle))\r
627 -         (funcall function mm-handle))\r
628 -        (t (dolist (part mm-handle)\r
629 -             (notmuch-foreach-mime-part function part)))))\r
630 +        (dolist (part (cdr mm-handle))\r
631 +          (notmuch-foreach-mime-part function part)))\r
632 +       ((bufferp (car mm-handle))\r
633 +        (funcall function mm-handle))\r
634 +       (t (dolist (part mm-handle)\r
635 +            (notmuch-foreach-mime-part function part)))))\r
636  \r
637  (defun notmuch-count-attachments (mm-handle)\r
638    (let ((count 0))\r
639      (notmuch-foreach-mime-part\r
640       (lambda (p)\r
641         (let ((disposition (mm-handle-disposition p)))\r
642 -         (and (listp disposition)\r
643 -              (or (equal (car disposition) "attachment")\r
644 -                  (and (equal (car disposition) "inline")\r
645 -                       (assq 'filename disposition)))\r
646 -              (incf count))))\r
647 +        (and (listp disposition)\r
648 +             (or (equal (car disposition) "attachment")\r
649 +                 (and (equal (car disposition) "inline")\r
650 +                      (assq 'filename disposition)))\r
651 +             (incf count))))\r
652       mm-handle)\r
653      count))\r
654  \r
655 @@ -109,13 +109,13 @@ For example:\r
656     (lambda (p)\r
657       (let ((disposition (mm-handle-disposition p)))\r
658         (and (listp disposition)\r
659 -            (or (equal (car disposition) "attachment")\r
660 -                (and (equal (car disposition) "inline")\r
661 -                     (assq 'filename disposition)))\r
662 -            (or (not queryp)\r
663 -                (y-or-n-p\r
664 -                 (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
665 -            (mm-save-part p))))\r
666 +           (or (equal (car disposition) "attachment")\r
667 +               (and (equal (car disposition) "inline")\r
668 +                    (assq 'filename disposition)))\r
669 +           (or (not queryp)\r
670 +               (y-or-n-p\r
671 +                (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
672 +           (mm-save-part p))))\r
673     mm-handle))\r
674  \r
675  (defun notmuch-documentation-first-line (symbol)\r
676 @@ -304,10 +304,10 @@ For a mouse binding, return nil."\r
677    (goto-char (point-min)))\r
678  \r
679  (defface notmuch-message-summary-face\r
680 - '((((class color) (background light)) (:background "#f0f0f0"))\r
681 -   (((class color) (background dark)) (:background "#303030")))\r
682 - "Face for the single-line message summary in notmuch-show-mode."\r
683 - :group 'notmuch)\r
684 +  '((((class color) (background light)) (:background "#f0f0f0"))\r
685 +    (((class color) (background dark)) (:background "#303030")))\r
686 +  "Face for the single-line message summary in notmuch-show-mode."\r
687 +  :group 'notmuch)\r
688  \r
689  (defface notmuch-search-date\r
690    '((t :inherit default))\r
691 @@ -467,7 +467,7 @@ Output from the process will be presented to the user as an error\r
692  and will also appear in a buffer named \"*Notmuch errors*\"."\r
693    (let ((error-buffer (get-buffer-create "*Notmuch errors*")))\r
694      (with-current-buffer error-buffer\r
695 -       (erase-buffer))\r
696 +      (erase-buffer))\r
697      (if (eq (apply 'call-process notmuch-command nil error-buffer nil args) 0)\r
698         (point)\r
699        (progn\r
700 @@ -650,9 +650,9 @@ This function advances the next thread when finished."\r
701                                  (not (string= notmuch-search-target-thread "found")))\r
702                             (set 'never-found-target-thread t))))))\r
703               (when (and never-found-target-thread\r
704 -                      notmuch-search-target-line)\r
705 -                 (goto-char (point-min))\r
706 -                 (forward-line (1- notmuch-search-target-line))))))))\r
707 +                        notmuch-search-target-line)\r
708 +               (goto-char (point-min))\r
709 +               (forward-line (1- notmuch-search-target-line))))))))\r
710  \r
711  (defcustom notmuch-search-line-faces nil\r
712    "Tag/face mapping for line highlighting in notmuch-search.\r
713 @@ -662,7 +662,7 @@ Here is an example of how to color search results based on tags.\r
714  \r
715   (setq notmuch-search-line-faces '((\"delete\" . (:foreground \"red\"\r
716                                                   :background \"blue\"))\r
717 -                                   (\"unread\" . (:foreground \"green\"))))\r
718 +                                  (\"unread\" . (:foreground \"green\"))))\r
719  \r
720  The attributes defined for matching tags are merged, with later\r
721  attributes overriding earlier. A message having both \"delete\"\r
722 @@ -894,30 +894,30 @@ characters as well as `_.+-'.\r
723  \r
724  PROMPT is the string to prompt with."\r
725    (lexical-let\r
726 -      ((completions\r
727 -       (append (list "folder:" "thread:" "id:" "date:" "from:" "to:"\r
728 -                     "subject:" "attachment:")\r
729 -               (mapcar (lambda (tag)\r
730 -                         (concat "tag:" tag))\r
731 -                       (process-lines notmuch-command "search" "--output=tags" "*")))))\r
732 -    (let ((keymap (copy-keymap minibuffer-local-map))\r
733 -         (minibuffer-completion-table\r
734 -          (completion-table-dynamic\r
735 -           (lambda (string)\r
736 -             ;; generate a list of possible completions for the current input\r
737 -             (cond\r
738 -              ;; this ugly regexp is used to get the last word of the input\r
739 -              ;; possibly preceded by a '('\r
740 -              ((string-match "\\(^\\|.* (?\\)\\([^ ]*\\)$" string)\r
741 -               (mapcar (lambda (compl)\r
742 -                         (concat (match-string-no-properties 1 string) compl))\r
743 -                       (all-completions (match-string-no-properties 2 string)\r
744 -                                        completions)))\r
745 -              (t (list string)))))))\r
746 -      ;; this was simpler than convincing completing-read to accept spaces:\r
747 -      (define-key keymap (kbd "<tab>") 'minibuffer-complete)\r
748 -      (read-from-minibuffer prompt nil keymap nil\r
749 -                           'notmuch-query-history nil nil))))\r
750 +   ((completions\r
751 +     (append (list "folder:" "thread:" "id:" "date:" "from:" "to:"\r
752 +                  "subject:" "attachment:")\r
753 +            (mapcar (lambda (tag)\r
754 +                      (concat "tag:" tag))\r
755 +                    (process-lines notmuch-command "search" "--output=tags" "*")))))\r
756 +   (let ((keymap (copy-keymap minibuffer-local-map))\r
757 +        (minibuffer-completion-table\r
758 +         (completion-table-dynamic\r
759 +          (lambda (string)\r
760 +            ;; generate a list of possible completions for the current input\r
761 +            (cond\r
762 +             ;; this ugly regexp is used to get the last word of the input\r
763 +             ;; possibly preceded by a '('\r
764 +             ((string-match "\\(^\\|.* (?\\)\\([^ ]*\\)$" string)\r
765 +              (mapcar (lambda (compl)\r
766 +                        (concat (match-string-no-properties 1 string) compl))\r
767 +                      (all-completions (match-string-no-properties 2 string)\r
768 +                                       completions)))\r
769 +             (t (list string)))))))\r
770 +     ;; this was simpler than convincing completing-read to accept spaces:\r
771 +     (define-key keymap (kbd "<tab>") 'minibuffer-complete)\r
772 +     (read-from-minibuffer prompt nil keymap nil\r
773 +                          'notmuch-query-history nil nil))))\r
774  \r
775  ;;;###autoload\r
776  (defun notmuch-search (query &optional oldest-first target-thread target-line continuation)\r
777 @@ -927,9 +927,9 @@ The optional parameters are used as follows:\r
778  \r
779    oldest-first: A Boolean controlling the sort order of returned threads\r
780    target-thread: A thread ID (with the thread: prefix) that will be made\r
781 -                 current if it appears in the search results.\r
782 +                current if it appears in the search results.\r
783    target-line: The line number to move to if the target thread does not\r
784 -               appear in the search results."\r
785 +              appear in the search results."\r
786    (interactive (list (notmuch-read-query "Notmuch search: ")))\r
787    (let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))\r
788      (switch-to-buffer buffer)\r
789 @@ -1094,8 +1094,8 @@ notmuch buffers exist, run `notmuch'."\r
790  \r
791      ;; Find the first notmuch buffer.\r
792      (setq first (loop for buffer in (buffer-list)\r
793 -                    if (notmuch-interesting-buffer buffer)\r
794 -                    return buffer))\r
795 +                     if (notmuch-interesting-buffer buffer)\r
796 +                     return buffer))\r
797  \r
798      (if first\r
799         ;; If the first one we found is any other than the starting\r
800 -- \r
801 1.7.6.4\r
802 \r