Re: [PATCH] man: escape backslash in notmuch-tag example
[notmuch-archives.git] / b2 / 5289b86a00101b71b31757e2608d0e4af04554
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 3F369431FD4\r
6         for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 14:28:22 -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 V6rTTRrlsv3B for <notmuch@notmuchmail.org>;\r
17         Mon, 26 Aug 2013 14:28:06 -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 25F5D431FAF\r
22         for <notmuch@notmuchmail.org>; Mon, 26 Aug 2013 14:28:06 -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 1VE4KO-0002OR-6P; Mon, 26 Aug 2013 22:28:02 +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 1VE4KN-0006LQ-TZ; Mon, 26 Aug 2013 22:28:00 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH 1/1] emacs: removed 3 duplicate functions from\r
34         notmuch-show.el\r
35 In-Reply-To: <1377548517-17130-1-git-send-email-tomi.ollila@iki.fi>\r
36 References: <1377548517-17130-1-git-send-email-tomi.ollila@iki.fi>\r
37 User-Agent: Notmuch/0.15.2+269~g01f5508 (http://notmuchmail.org) Emacs/23.4.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Mon, 26 Aug 2013 22:27:57 +0100\r
40 Message-ID: <87mwo4dtwi.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: 93.97.24.31\r
44 X-QM-SPAM-Info: Sender has good ham record.  :)\r
45 X-QM-Body-MD5: 38821d11b1f0d5101fb0fe214ad2739d (of first 20000 bytes)\r
46 X-SpamAssassin-Score: 0.0\r
47 X-SpamAssassin-SpamBar: /\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
49         determine if it is\r
50         spam. We require at least 5.0 points to mark a message as spam.\r
51         This message scored 0.0 points. Summary of the scoring: \r
52         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
53         provider *      (markwalters1009[at]gmail.com)\r
54         *  0.0 AWL AWL: From: address is in the auto white-list\r
55 X-QM-Scan-Virus: ClamAV says the message is clean\r
56 Cc: tomi.ollila@iki.fi\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Mon, 26 Aug 2013 21:28:22 -0000\r
70 \r
71 \r
72 This LGTM +1\r
73 \r
74 Mark\r
75 \r
76 On Mon, 26 Aug 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
77 > notmuch-show.el and notmuch.el had 3 duplicate, identical functions:\r
78 > notmuch-foreach-mime-part, notmuch-count-attachments and\r
79 > notmuch-save-attachments. Now these functions in notmuch-show.el\r
80 > are replaced with declare-functions pointing to "notmuch"(.el).\r
81 > ---\r
82 >  emacs/notmuch-show.el | 39 +++------------------------------------\r
83 >  1 file changed, 3 insertions(+), 36 deletions(-)\r
84 >\r
85 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
86 > index 82b70ba..2896aae 100644\r
87 > --- a/emacs/notmuch-show.el\r
88 > +++ b/emacs/notmuch-show.el\r
89 > @@ -41,6 +41,9 @@\r
90 >  (declare-function notmuch-search-next-thread "notmuch" nil)\r
91 >  (declare-function notmuch-search-previous-thread "notmuch" nil)\r
92 >  (declare-function notmuch-search-show-thread "notmuch" nil)\r
93 > +(declare-function notmuch-foreach-mime-part "notmuch" (function mm-handle))\r
94 > +(declare-function notmuch-count-attachments "notmuch" (mm-handle))\r
95 > +(declare-function notmuch-save-attachments "notmuch" (mm-handle &optional queryp))\r
96 >  \r
97 >  (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
98 >    "Headers that should be shown in a message, in this order.\r
99 > @@ -237,42 +240,6 @@ For example, if you wanted to remove an \"unread\" tag and add a\r
100 >                                )))\r
101 >       (mm-display-parts (mm-dissect-buffer)))))\r
102 >  \r
103 > -(defun notmuch-foreach-mime-part (function mm-handle)\r
104 > -  (cond ((stringp (car mm-handle))\r
105 > -         (dolist (part (cdr mm-handle))\r
106 > -           (notmuch-foreach-mime-part function part)))\r
107 > -        ((bufferp (car mm-handle))\r
108 > -         (funcall function mm-handle))\r
109 > -        (t (dolist (part mm-handle)\r
110 > -             (notmuch-foreach-mime-part function part)))))\r
111 > -\r
112 > -(defun notmuch-count-attachments (mm-handle)\r
113 > -  (let ((count 0))\r
114 > -    (notmuch-foreach-mime-part\r
115 > -     (lambda (p)\r
116 > -       (let ((disposition (mm-handle-disposition p)))\r
117 > -         (and (listp disposition)\r
118 > -              (or (equal (car disposition) "attachment")\r
119 > -                  (and (equal (car disposition) "inline")\r
120 > -                       (assq 'filename disposition)))\r
121 > -              (incf count))))\r
122 > -     mm-handle)\r
123 > -    count))\r
124 > -\r
125 > -(defun notmuch-save-attachments (mm-handle &optional queryp)\r
126 > -  (notmuch-foreach-mime-part\r
127 > -   (lambda (p)\r
128 > -     (let ((disposition (mm-handle-disposition p)))\r
129 > -       (and (listp disposition)\r
130 > -            (or (equal (car disposition) "attachment")\r
131 > -                (and (equal (car disposition) "inline")\r
132 > -                     (assq 'filename disposition)))\r
133 > -            (or (not queryp)\r
134 > -                (y-or-n-p\r
135 > -                 (concat "Save '" (cdr (assq 'filename disposition)) "' ")))\r
136 > -            (mm-save-part p))))\r
137 > -   mm-handle))\r
138 > -\r
139 >  (defun notmuch-show-save-attachments ()\r
140 >    "Save all attachments from the current message."\r
141 >    (interactive)\r
142 > -- \r
143 > 1.8.0\r
144 >\r
145 > _______________________________________________\r
146 > notmuch mailing list\r
147 > notmuch@notmuchmail.org\r
148 > http://notmuchmail.org/mailman/listinfo/notmuch\r