Re: Emacs: Crypto: How to get automatic encryption?
[notmuch-archives.git] / 87 / 1d4ccff709bd66ad5e14233fe5127fe7bb8188
1 Return-Path: <amdragon@mit.edu>\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 454A2431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 15:50:24 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 eFdFuVYk-6T5 for <notmuch@notmuchmail.org>;\r
16         Sat, 17 Dec 2011 15:50:22 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
18         [18.9.25.12])\r
19         by olra.theworths.org (Postfix) with ESMTP id 37FF6431FB6\r
20         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 15:50:22 -0800 (PST)\r
21 X-AuditID: 1209190c-b7fad6d000000920-45-4eed2abc4c5b\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id FF.D4.02336.CBA2DEE4; Sat, 17 Dec 2011 18:50:20 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBHNoJh3021647; \r
27         Sat, 17 Dec 2011 18:50:20 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBHNoHj6002293\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sat, 17 Dec 2011 18:50:18 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Rc42S-0007IV-QC; Sat, 17 Dec 2011 18:51:36 -0500\r
37 Date: Sat, 17 Dec 2011 18:51:36 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Aaron Ecay <aaronecay@gmail.com>\r
40 Subject: Re: [PATCH] [emacs] Don't quote lambda forms\r
41 Message-ID: <20111217235136.GJ19427@mit.edu>\r
42 References: <1324136868-6662-1-git-send-email-aaronecay@gmail.com>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 Content-Disposition: inline\r
46 In-Reply-To: <1324136868-6662-1-git-send-email-aaronecay@gmail.com>\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)\r
48 X-Brightmail-Tracker:\r
49  H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT192j9dbPoGs5u8W05V/YLa7fnMns\r
50         wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGW8e/2HseBCSMX5o9wNjI/tuhg5OSQETCSe\r
51         9T1hgbDFJC7cW8/WxcjFISSwj1Hi3oNfLBDOBkaJf/u3s4JUCQmcZJI4Pk0MIrGEUWLD9q9g\r
52         7SwCqhKHrz8FK2IT0JDYtn85I4gtIqAiMXvefDCbWUBa4tvvZiYQW1jAVOLWz79g9bwCOhK7\r
53         nuyBWuAkcX76RBaIuKDEyZkQ5zELaEnc+PcSqJcDbM7yfxwgYU4BZ4l1u3+BjRQFWjXl5Da2\r
54         CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdQ73czBK91JTSTYygoOaU\r
55         5NnB+Oag0iFGAQ5GJR7ezOrXfkKsiWXFlbmHGCU5mJREees03voJ8SXlp1RmJBZnxBeV5qQW\r
56         H2KU4GBWEuFVC3/jJ8SbklhZlVqUD5OS5mBREuet3vXQT0ggPbEkNTs1tSC1CCYrw8GhJMFr\r
57         AIxeIcGi1PTUirTMnBKENBMHJ8hwHqDhKiA1vMUFibnFmekQ+VOMilLivP80gRICIImM0jy4\r
58         XljSecUoDvSKMMQKHmDCgut+BTSYCWhwXyDI1cUliQgpqQbGJSt0568XT3ZZ1yrE91TvY/nd\r
59         /54y+3fw1l06ziPiY6o4dbnT0l0Krj8Cw/zlT+/huOa644WJUl3QjcojKcl+S+2mzhUqOvA7\r
60         /JZXlL/t50lXrk4RMCh4HagldWuzwszMaxvvxfwy+hZaMOeClMGm46fPJ+82cI4s5/4wp0lA\r
61         p4zf2X52wJu3SizFGYmGWsxFxYkAimY4OBUDAAA=\r
62 Cc: notmuch@notmuchmail.org\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Sat, 17 Dec 2011 23:50:24 -0000\r
76 \r
77 LGTM.  Too bad it requires so much re-indenting, but such is the\r
78 nature of Lisp.\r
79 \r
80 Quoth Aaron Ecay on Dec 17 at 10:47 am:\r
81 > This generates byte-compiler warnings on (at least) current trunk\r
82 > versions of Emacs.  The quote is not necessary; lambda forms are\r
83 > self-quoting.\r
84 > ---\r
85 >  emacs/notmuch-crypto.el      |    4 +-\r
86 >  emacs/notmuch-hello.el       |   64 +++++++++++++++++++++---------------------\r
87 >  emacs/notmuch-maildir-fcc.el |   12 ++++----\r
88 >  emacs/notmuch-message.el     |    8 ++--\r
89 >  emacs/notmuch-show.el        |   20 ++++++------\r
90 >  emacs/notmuch.el             |   20 ++++++------\r
91 >  6 files changed, 64 insertions(+), 64 deletions(-)\r
92\r
93 > diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el\r
94 > index 44fccae..8974af1 100644\r
95 > --- a/emacs/notmuch-crypto.el\r
96 > +++ b/emacs/notmuch-crypto.el\r
97 > @@ -63,7 +63,7 @@ mode."\r
98 >    :group 'notmuch)\r
99 >  \r
100 >  (define-button-type 'notmuch-crypto-status-button-type\r
101 > -  'action '(lambda (button) (message (button-get button 'help-echo)))\r
102 > +  'action (lambda (button) (message (button-get button 'help-echo)))\r
103 >    'follow-link t\r
104 >    'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts.")\r
105 >  \r
106 > @@ -72,7 +72,7 @@ mode."\r
107 >        (help-msg nil)\r
108 >        (label "Signature not processed")\r
109 >        (face 'notmuch-crypto-signature-unknown)\r
110 > -      (button-action '(lambda (button) (message (button-get button 'help-echo)))))\r
111 > +      (button-action (lambda (button) (message (button-get button 'help-echo)))))\r
112 >      (cond\r
113 >       ((string= status "good")\r
114 >        (let ((fingerprint (concat "0x" (plist-get sigstatus :fingerprint))))\r
115 > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
116 > index 0582cae..d0dcf97 100644\r
117 > --- a/emacs/notmuch-hello.el\r
118 > +++ b/emacs/notmuch-hello.el\r
119 > @@ -331,8 +331,8 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
120 >  (defvar notmuch-hello-mode-map\r
121 >    (let ((map (make-sparse-keymap)))\r
122 >      (set-keymap-parent map widget-keymap)\r
123 > -    (define-key map "v" '(lambda () "Display the notmuch version" (interactive)\r
124 > -                           (message "notmuch version %s" (notmuch-version))))\r
125 > +    (define-key map "v" (lambda () "Display the notmuch version" (interactive)\r
126 > +                       (message "notmuch version %s" (notmuch-version))))\r
127 >      (define-key map "?" 'notmuch-help)\r
128 >      (define-key map "q" 'notmuch-kill-this-buffer)\r
129 >      (define-key map "=" 'notmuch-hello-update)\r
130 > @@ -502,36 +502,36 @@ Complete list of currently available key bindings:\r
131 >         (widget-insert "\n\n")\r
132 >         (let ((start (point))\r
133 >               (nth 0))\r
134 > -         (mapc '(lambda (search)\r
135 > -                  (let ((widget-symbol (intern (format "notmuch-hello-search-%d" nth))))\r
136 > -                    (set widget-symbol\r
137 > -                         (widget-create 'editable-field\r
138 > -                                    ;; Don't let the search boxes be\r
139 > -                                    ;; less than 8 characters wide.\r
140 > -                                    :size (max 8\r
141 > -                                               (- (window-width)\r
142 > -                                                  ;; Leave some space\r
143 > -                                                  ;; at the start and\r
144 > -                                                  ;; end of the\r
145 > -                                                  ;; boxes.\r
146 > -                                                  (* 2 notmuch-hello-indent)\r
147 > -                                                  ;; 1 for the space\r
148 > -                                                  ;; before the\r
149 > -                                                  ;; `[save]' button. 6\r
150 > -                                                  ;; for the `[save]'\r
151 > -                                                  ;; button.\r
152 > -                                                  1 6))\r
153 > -                                    :action (lambda (widget &rest ignore)\r
154 > -                                              (notmuch-hello-search (widget-value widget)))\r
155 > -                                    search))\r
156 > -                    (widget-insert " ")\r
157 > -                    (widget-create 'push-button\r
158 > -                                   :notify (lambda (widget &rest ignore)\r
159 > -                                             (notmuch-hello-add-saved-search widget))\r
160 > -                                   :notmuch-saved-search-widget widget-symbol\r
161 > -                                   "save"))\r
162 > -                  (widget-insert "\n")\r
163 > -                  (setq nth (1+ nth)))\r
164 > +         (mapc (lambda (search)\r
165 > +                 (let ((widget-symbol (intern (format "notmuch-hello-search-%d" nth))))\r
166 > +                   (set widget-symbol\r
167 > +                        (widget-create 'editable-field\r
168 > +                                       ;; Don't let the search boxes be\r
169 > +                                       ;; less than 8 characters wide.\r
170 > +                                       :size (max 8\r
171 > +                                                  (- (window-width)\r
172 > +                                                     ;; Leave some space\r
173 > +                                                     ;; at the start and\r
174 > +                                                     ;; end of the\r
175 > +                                                     ;; boxes.\r
176 > +                                                     (* 2 notmuch-hello-indent)\r
177 > +                                                     ;; 1 for the space\r
178 > +                                                     ;; before the\r
179 > +                                                     ;; `[save]' button. 6\r
180 > +                                                     ;; for the `[save]'\r
181 > +                                                     ;; button.\r
182 > +                                                     1 6))\r
183 > +                                       :action (lambda (widget &rest ignore)\r
184 > +                                                 (notmuch-hello-search (widget-value widget)))\r
185 > +                                       search))\r
186 > +                   (widget-insert " ")\r
187 > +                   (widget-create 'push-button\r
188 > +                                  :notify (lambda (widget &rest ignore)\r
189 > +                                            (notmuch-hello-add-saved-search widget))\r
190 > +                                  :notmuch-saved-search-widget widget-symbol\r
191 > +                                  "save"))\r
192 > +                 (widget-insert "\n")\r
193 > +                 (setq nth (1+ nth)))\r
194 >                 notmuch-hello-recent-searches)\r
195 >           (indent-rigidly start (point) notmuch-hello-indent)))\r
196 >  \r
197 > diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
198 > index e678868..6fbf82d 100644\r
199 > --- a/emacs/notmuch-maildir-fcc.el\r
200 > +++ b/emacs/notmuch-maildir-fcc.el\r
201 > @@ -65,8 +65,8 @@ yet when sending a mail."\r
202 >      ;; Set up the message-fcc-handler to move mails to the maildir in Fcc\r
203 >      ;; The parameter is set to mark messages as "seen"\r
204 >      (setq message-fcc-handler-function\r
205 > -          '(lambda (destdir)\r
206 > -             (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))\r
207 > +          (lambda (destdir)\r
208 > +         (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))\r
209 >      ;; add a hook to actually insert the Fcc header when sending\r
210 >      (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup))\r
211 >  \r
212 > @@ -131,10 +131,10 @@ will NOT be removed or replaced."\r
213 >   \r
214 >  (defun notmuch-maildir-fcc-host-fixer (hostname)\r
215 >    (replace-regexp-in-string "/\\|:"\r
216 > -                         '(lambda (s)\r
217 > -                               (cond ((string-equal s "/") "\\057")\r
218 > -                                     ((string-equal s ":") "\\072")\r
219 > -                                     (t s)))\r
220 > +                         (lambda (s)\r
221 > +                           (cond ((string-equal s "/") "\\057")\r
222 > +                                 ((string-equal s ":") "\\072")\r
223 > +                                 (t s)))\r
224 >                           hostname\r
225 >                           t\r
226 >                           t))\r
227 > diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el\r
228 > index aefd3fb..08e5b17 100644\r
229 > --- a/emacs/notmuch-message.el\r
230 > +++ b/emacs/notmuch-message.el\r
231 > @@ -39,10 +39,10 @@ the \"inbox\" and \"todo\", you would set\r
232 >      (when (and notmuch-message-replied-tags rep)\r
233 >        ;; add a "+" to any tag that is doesn't already begin with a "+"\r
234 >        ;; or "-"\r
235 > -      (let ((tags (mapcar '(lambda (str)\r
236 > -                          (if (not (string-match "^[+-]" str))\r
237 > -                              (concat "+" str)\r
238 > -                            str))\r
239 > +      (let ((tags (mapcar (lambda (str)\r
240 > +                         (if (not (string-match "^[+-]" str))\r
241 > +                             (concat "+" str)\r
242 > +                           str))\r
243 >                         notmuch-message-replied-tags)))\r
244 >       (apply 'notmuch-tag (concat "id:" (car (car rep))) tags)))))\r
245 >  \r
246 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
247 > index d7fbbca..bbad094 100644\r
248 > --- a/emacs/notmuch-show.el\r
249 > +++ b/emacs/notmuch-show.el\r
250 > @@ -265,12 +265,12 @@ message at DEPTH in the current thread."\r
251 >  (defun notmuch-show-insert-headers (headers)\r
252 >    "Insert the headers of the current message."\r
253 >    (let ((start (point)))\r
254 > -    (mapc '(lambda (header)\r
255 > -          (let* ((header-symbol (intern (concat ":" header)))\r
256 > -                 (header-value (plist-get headers header-symbol)))\r
257 > -            (if (and header-value\r
258 > -                     (not (string-equal "" header-value)))\r
259 > -                (notmuch-show-insert-header header header-value))))\r
260 > +    (mapc (lambda (header)\r
261 > +         (let* ((header-symbol (intern (concat ":" header)))\r
262 > +                (header-value (plist-get headers header-symbol)))\r
263 > +           (if (and header-value\r
264 > +                    (not (string-equal "" header-value)))\r
265 > +               (notmuch-show-insert-header header header-value))))\r
266 >         notmuch-message-headers)\r
267 >      (save-excursion\r
268 >        (save-restriction\r
269 > @@ -344,7 +344,7 @@ current buffer, if possible."\r
270 >      ))\r
271 >  \r
272 >  (defun notmuch-show-multipart/*-to-list (part)\r
273 > -  (mapcar '(lambda (inner-part) (plist-get inner-part :content-type))\r
274 > +  (mapcar (lambda (inner-part) (plist-get inner-part :content-type))\r
275 >         (plist-get part :content)))\r
276 >  \r
277 >  (defun notmuch-show-multipart/alternative-choose (types)\r
278 > @@ -667,7 +667,7 @@ current buffer, if possible."\r
279 >  \r
280 >  (defun notmuch-show-insert-body (msg body depth)\r
281 >    "Insert the body BODY at depth DEPTH in the current thread."\r
282 > -  (mapc '(lambda (part) (notmuch-show-insert-bodypart msg part depth)) body))\r
283 > +  (mapc (lambda (part) (notmuch-show-insert-bodypart msg part depth)) body))\r
284 >  \r
285 >  (defun notmuch-show-make-symbol (type)\r
286 >    (make-symbol (concat "notmuch-show-" type)))\r
287 > @@ -785,11 +785,11 @@ current buffer, if possible."\r
288 >  \r
289 >  (defun notmuch-show-insert-thread (thread depth)\r
290 >    "Insert the thread THREAD at depth DEPTH in the current forest."\r
291 > -  (mapc '(lambda (tree) (notmuch-show-insert-tree tree depth)) thread))\r
292 > +  (mapc (lambda (tree) (notmuch-show-insert-tree tree depth)) thread))\r
293 >  \r
294 >  (defun notmuch-show-insert-forest (forest)\r
295 >    "Insert the forest of threads FOREST."\r
296 > -  (mapc '(lambda (thread) (notmuch-show-insert-thread thread 0)) forest))\r
297 > +  (mapc (lambda (thread) (notmuch-show-insert-thread thread 0)) forest))\r
298 >  \r
299 >  (defvar notmuch-show-thread-id nil)\r
300 >  (make-variable-buffer-local 'notmuch-show-thread-id)\r
301 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
302 > index 8936149..6bf4a08 100644\r
303 > --- a/emacs/notmuch.el\r
304 > +++ b/emacs/notmuch.el\r
305 > @@ -662,16 +662,16 @@ foreground and blue background."\r
306 >    ;; Create the overlay only if the message has tags which match one\r
307 >    ;; of those specified in `notmuch-search-line-faces'.\r
308 >    (let (overlay)\r
309 > -    (mapc '(lambda (elem)\r
310 > -          (let ((tag (car elem))\r
311 > -                (attributes (cdr elem)))\r
312 > -            (when (member tag line-tag-list)\r
313 > -              (when (not overlay)\r
314 > -                (setq overlay (make-overlay start end)))\r
315 > -              ;; Merge the specified properties with any already\r
316 > -              ;; applied from an earlier match.\r
317 > -              (overlay-put overlay 'face\r
318 > -                           (append (overlay-get overlay 'face) attributes)))))\r
319 > +    (mapc (lambda (elem)\r
320 > +         (let ((tag (car elem))\r
321 > +               (attributes (cdr elem)))\r
322 > +           (when (member tag line-tag-list)\r
323 > +             (when (not overlay)\r
324 > +               (setq overlay (make-overlay start end)))\r
325 > +             ;; Merge the specified properties with any already\r
326 > +             ;; applied from an earlier match.\r
327 > +             (overlay-put overlay 'face\r
328 > +                          (append (overlay-get overlay 'face) attributes)))))\r
329 >         notmuch-search-line-faces)))\r
330 >  \r
331 >  (defun notmuch-search-author-propertize (authors)\r