1 Return-Path: <pieter@praet.org>
\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 3E1C7431FD0
\r
6 for <notmuch@notmuchmail.org>; Tue, 5 Jul 2011 11:33:14 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 9dK8HUNlUA7c for <notmuch@notmuchmail.org>;
\r
16 Tue, 5 Jul 2011 11:33:12 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 8CB40431FB6
\r
21 for <notmuch@notmuchmail.org>; Tue, 5 Jul 2011 11:33:11 -0700 (PDT)
\r
22 Received: by wyh22 with SMTP id 22so4824971wyh.26
\r
23 for <notmuch@notmuchmail.org>; Tue, 05 Jul 2011 11:33:10 -0700 (PDT)
\r
24 Received: by 10.227.32.136 with SMTP id c8mr6676109wbd.7.1309890789969;
\r
25 Tue, 05 Jul 2011 11:33:09 -0700 (PDT)
\r
26 Received: from localhost ([109.131.155.31])
\r
27 by mx.google.com with ESMTPS id n18sm5506108wbh.40.2011.07.05.11.33.07
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Tue, 05 Jul 2011 11:33:08 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: notmuch@notmuchmail.org
\r
32 Subject: [PATCH] emacs: logically group def{custom,face}s
\r
33 Date: Tue, 5 Jul 2011 20:33:00 +0200
\r
34 Message-Id: <1309890780-8214-1-git-send-email-pieter@praet.org>
\r
35 X-Mailer: git-send-email 1.7.5.4
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Tue, 05 Jul 2011 18:33:14 -0000
\r
50 To allow for expansion whilst keeping everything tidy and organized,
\r
51 move all defcustom/defface variables to the following subgroups,
\r
52 defined in notmuch-lib.el:
\r
63 Signed-off-by: Pieter Praet <pieter@praet.org>
\r
65 emacs/notmuch-address.el | 3 +-
\r
66 emacs/notmuch-crypto.el | 17 ++++++++++-----
\r
67 emacs/notmuch-hello.el | 20 ++++++++++--------
\r
68 emacs/notmuch-lib.el | 44 ++++++++++++++++++++++++++++++++++++++++-
\r
69 emacs/notmuch-maildir-fcc.el | 2 +-
\r
70 emacs/notmuch-message.el | 2 +-
\r
71 emacs/notmuch-mua.el | 11 +++++----
\r
72 emacs/notmuch-show.el | 14 ++++++------
\r
73 emacs/notmuch.el | 35 +++++++++++++++++++++------------
\r
74 9 files changed, 103 insertions(+), 45 deletions(-)
\r
76 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
\r
77 index 1a7c577..553a04e 100644
\r
78 --- a/emacs/notmuch-address.el
\r
79 +++ b/emacs/notmuch-address.el
\r
81 single argument and output a list of possible matches, one per
\r
85 + :group 'notmuch-send
\r
86 + :group 'notmuch-external)
\r
88 (defvar notmuch-address-message-alist-member
\r
89 '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
\r
90 diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
\r
91 index f03266f..b8132f5 100644
\r
92 --- a/emacs/notmuch-crypto.el
\r
93 +++ b/emacs/notmuch-crypto.el
\r
94 @@ -33,33 +33,38 @@ validity of user ID of the signer.
\r
95 The effect of setting this variable can be seen temporarily by
\r
96 viewing a signed or encrypted message with M-RET in notmuch
\r
99 + :group 'notmuch-crypto
\r
102 (defface notmuch-crypto-signature-good
\r
103 '((t (:background "green" :foreground "black")))
\r
104 "Face used for good signatures."
\r
106 + :group 'notmuch-crypto
\r
107 + :group 'notmuch-appearance)
\r
109 (defface notmuch-crypto-signature-good-key
\r
110 '((t (:background "orange" :foreground "black")))
\r
111 "Face used for good signatures."
\r
113 + :group 'notmuch-crypto
\r
114 + :group 'notmuch-appearance)
\r
116 (defface notmuch-crypto-signature-bad
\r
117 '((t (:background "red" :foreground "black")))
\r
118 "Face used for bad signatures."
\r
120 + :group 'notmuch-crypto
\r
121 + :group 'notmuch-appearance)
\r
123 (defface notmuch-crypto-signature-unknown
\r
124 '((t (:background "red" :foreground "black")))
\r
125 "Face used for signatures of unknown status."
\r
127 + :group 'notmuch-crypto
\r
128 + :group 'notmuch-appearance)
\r
130 (defface notmuch-crypto-decryption
\r
131 '((t (:background "purple" :foreground "black")))
\r
132 "Face used for encryption/decryption status messages."
\r
134 + :group 'notmuch-crypto
\r
135 + :group 'notmuch-appearance)
\r
137 (define-button-type 'notmuch-crypto-status-button-type
\r
138 'action '(lambda (button) (message (button-get button 'help-echo)))
\r
139 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
140 index 65fde75..060ffe4 100644
\r
141 --- a/emacs/notmuch-hello.el
\r
142 +++ b/emacs/notmuch-hello.el
\r
143 @@ -35,12 +35,12 @@
\r
144 (defcustom notmuch-recent-searches-max 10
\r
145 "The number of recent searches to store and display."
\r
148 + :group 'notmuch-hello)
\r
150 (defcustom notmuch-show-empty-saved-searches nil
\r
151 "Should saved searches with no messages be listed?"
\r
154 + :group 'notmuch-hello)
\r
156 (defvar notmuch-hello-indent 4
\r
157 "How much to indent non-headers.")
\r
158 @@ -48,12 +48,13 @@
\r
159 (defcustom notmuch-show-logo t
\r
160 "Should the notmuch logo be shown?"
\r
163 + :group 'notmuch-hello
\r
164 + :group 'notmuch-appearance)
\r
166 (defcustom notmuch-show-all-tags-list nil
\r
167 "Should all tags be shown in the notmuch-hello view?"
\r
170 + :group 'notmuch-hello)
\r
172 (defcustom notmuch-hello-tag-list-make-query nil
\r
173 "Function or string to generate queries for the all tags list.
\r
174 @@ -68,12 +69,12 @@ should return a filter for that tag, or nil to hide the tag."
\r
175 (const :tag "Unread messages" "tag:unread")
\r
176 (const :tag "Custom filter" string)
\r
177 (const :tag "Custom filter function" function))
\r
179 + :group 'notmuch-hello)
\r
181 (defcustom notmuch-hello-hide-tags nil
\r
182 "List of tags to be hidden in the \"all tags\"-section."
\r
183 :type '(repeat string)
\r
185 + :group 'notmuch-hello)
\r
187 (defface notmuch-hello-logo-background
\r
189 @@ -83,7 +84,8 @@ should return a filter for that tag, or nil to hide the tag."
\r
190 (background light))
\r
191 (:background "white")))
\r
192 "Background colour for the notmuch logo."
\r
194 + :group 'notmuch-hello
\r
195 + :group 'notmuch-appearance)
\r
197 (defcustom notmuch-column-control t
\r
198 "Controls the number of columns for saved searches/tags in notmuch view.
\r
199 @@ -105,7 +107,7 @@ So:
\r
201 - if you don't want to worry about all of this nonsense, leave
\r
204 + :group 'notmuch-hello
\r
206 (const :tag "Automatically calculated" t)
\r
207 (integer :tag "Number of characters")
\r
208 @@ -115,7 +117,7 @@ So:
\r
209 "The string used as a decimal separator.
\r
211 Typically \",\" in the US and UK and \".\" in Europe."
\r
213 + :group 'notmuch-hello
\r
216 (defvar notmuch-hello-url "http://notmuchmail.org"
\r
217 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
218 index f93c957..2fd1764 100644
\r
219 --- a/emacs/notmuch-lib.el
\r
220 +++ b/emacs/notmuch-lib.el
\r
221 @@ -28,17 +28,57 @@
\r
222 "Notmuch mail reader for Emacs."
\r
225 +(defgroup notmuch-hello nil
\r
227 + :tag "Notmuch Hello"
\r
230 +(defgroup notmuch-search nil
\r
232 + :tag "Notmuch Search"
\r
235 +(defgroup notmuch-show nil
\r
237 + :tag "Notmuch Show"
\r
240 +(defgroup notmuch-send nil
\r
242 + :tag "Notmuch Send"
\r
245 +(defgroup notmuch-crypto nil
\r
247 + :tag "Notmuch Crypto"
\r
250 +(defgroup notmuch-hooks nil
\r
252 + :tag "Notmuch Hooks"
\r
255 +(defgroup notmuch-appearance nil
\r
257 + :tag "Notmuch Appearance"
\r
260 +(defgroup notmuch-external nil
\r
262 + :tag "Notmuch External Commands"
\r
265 (defcustom notmuch-search-oldest-first t
\r
266 "Show the oldest mail first when searching."
\r
269 + :group 'notmuch-search)
\r
273 (defcustom notmuch-saved-searches nil
\r
274 "A list of saved searches to display."
\r
275 :type '(alist :key-type string :value-type string)
\r
277 + :group 'notmuch-hello)
\r
279 (defvar notmuch-folders nil
\r
280 "Deprecated name for what is now known as `notmuch-saved-searches'.")
\r
281 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
\r
282 index e678868..b211302 100644
\r
283 --- a/emacs/notmuch-maildir-fcc.el
\r
284 +++ b/emacs/notmuch-maildir-fcc.el
\r
285 @@ -52,7 +52,7 @@ You will be prompted to create the directory if it does not exist
\r
286 yet when sending a mail."
\r
288 :require 'notmuch-fcc-initialization
\r
290 + :group 'notmuch-send
\r
292 (const :tag "No FCC header" nil)
\r
293 (string :tag "A single folder")
\r
294 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
\r
295 index aefd3fb..84b0e32 100644
\r
296 --- a/emacs/notmuch-message.el
\r
297 +++ b/emacs/notmuch-message.el
\r
298 @@ -31,7 +31,7 @@ For example, if you wanted to add a \"replied\" tag and remove
\r
299 the \"inbox\" and \"todo\", you would set
\r
300 (\"replied\" \"-inbox\" \"-todo\"\)"
\r
303 + :group 'notmuch-send)
\r
305 (defun notmuch-message-mark-replied ()
\r
306 ;; get the in-reply-to header and parse it for the message id.
\r
307 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
308 index 274c5da..612ce90 100644
\r
309 --- a/emacs/notmuch-mua.el
\r
310 +++ b/emacs/notmuch-mua.el
\r
311 @@ -28,13 +28,14 @@
\r
313 (defcustom notmuch-mua-send-hook '(notmuch-mua-message-send-hook)
\r
314 "Hook run before sending messages."
\r
316 + :group 'notmuch-send
\r
317 + :group 'notmuch-hooks
\r
320 (defcustom notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full
\r
321 "Function used to generate a `User-Agent:' string. If this is
\r
322 `nil' then no `User-Agent:' will be generated."
\r
324 + :group 'notmuch-send
\r
326 :options '(notmuch-mua-user-agent-full
\r
327 notmuch-mua-user-agent-notmuch
\r
329 (defcustom notmuch-mua-hidden-headers '("^User-Agent:")
\r
330 "Headers that are added to the `message-mode' hidden headers
\r
333 + :group 'notmuch-send
\r
334 :type '(repeat string))
\r
337 @@ -151,7 +152,7 @@ list."
\r
339 If this variable is left unset, then a list will be constructed from the
\r
340 name and addresses configured in the notmuch configuration file."
\r
342 + :group 'notmuch-send
\r
343 :type '(repeat string))
\r
345 (defcustom notmuch-always-prompt-for-sender nil
\r
346 @@ -159,7 +160,7 @@ name and addresses configured in the notmuch configuration file."
\r
348 This is not taken into account when replying to a message, because in that case
\r
349 the From: header is already filled in by notmuch."
\r
351 + :group 'notmuch-send
\r
354 (defvar notmuch-mua-sender-history nil)
\r
355 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
356 index f96743b..aabe9c5 100644
\r
357 --- a/emacs/notmuch-show.el
\r
358 +++ b/emacs/notmuch-show.el
\r
359 @@ -46,7 +46,7 @@ For an open message, all of these headers will be made visible
\r
360 according to `notmuch-message-headers-visible' or can be toggled
\r
361 with `notmuch-show-toggle-headers'. For a closed message, only
\r
362 the first header in the list will be visible."
\r
364 + :group 'notmuch-show
\r
365 :type '(repeat string))
\r
367 (defcustom notmuch-message-headers-visible t
\r
368 @@ -57,12 +57,12 @@ If this value is non-nil, then all of the headers defined in
\r
369 of each message. Otherwise, these headers will be hidden and
\r
370 `notmuch-show-toggle-headers' can be used to make the visible for
\r
371 any given message."
\r
373 + :group 'notmuch-show
\r
376 (defcustom notmuch-show-relative-dates t
\r
377 "Display relative dates in the message summary line."
\r
379 + :group 'notmuch-show
\r
382 (defvar notmuch-show-markup-headers-hook '(notmuch-show-colour-headers)
\r
383 @@ -71,12 +71,12 @@ any given message."
\r
385 (defcustom notmuch-show-hook nil
\r
386 "Functions called after populating a `notmuch-show' buffer."
\r
388 + :group 'notmuch-show
\r
391 (defcustom notmuch-show-insert-text/plain-hook '(notmuch-wash-excerpt-citations)
\r
392 "Functions used to improve the display of text/plain parts."
\r
394 + :group 'notmuch-show
\r
396 :options '(notmuch-wash-convert-inline-patch-to-part
\r
397 notmuch-wash-wrap-long-lines
\r
398 @@ -87,13 +87,13 @@ any given message."
\r
399 ;; Mostly useful for debugging.
\r
400 (defcustom notmuch-show-all-multipart/alternative-parts t
\r
401 "Should all parts of multipart/alternative parts be shown?"
\r
403 + :group 'notmuch-show
\r
406 (defcustom notmuch-show-indent-multipart nil
\r
407 "Should the sub-parts of a multipart/* part be indented?"
\r
408 ;; dme: Not sure which is a good default.
\r
410 + :group 'notmuch-show
\r
413 (defmacro with-current-notmuch-show-message (&rest body)
\r
414 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
415 index f11ec24..db6bce6 100644
\r
416 --- a/emacs/notmuch.el
\r
417 +++ b/emacs/notmuch.el
\r
418 @@ -70,7 +70,7 @@ For example:
\r
419 (setq notmuch-search-result-format \(\(\"authors\" . \"%-40s\"\)
\r
420 \(\"subject\" . \"%s\"\)\)\)"
\r
421 :type '(alist :key-type (string) :value-type (string))
\r
423 + :group 'notmuch-search)
\r
425 (defun notmuch-select-tag-with-completion (prompt &rest search-terms)
\r
427 @@ -189,7 +189,8 @@ For a mouse binding, return nil."
\r
428 "List of functions to call when notmuch displays the search results."
\r
430 :options '(hl-line-mode)
\r
432 + :group 'notmuch-search
\r
433 + :group 'notmuch-hooks)
\r
435 (defvar notmuch-search-mode-map
\r
436 (let ((map (make-sparse-keymap)))
\r
437 @@ -297,27 +298,32 @@ For a mouse binding, return nil."
\r
438 '((((class color) (background light)) (:background "#f0f0f0"))
\r
439 (((class color) (background dark)) (:background "#303030")))
\r
440 "Face for the single-line message summary in notmuch-show-mode."
\r
442 + :group 'notmuch-show
\r
443 + :group 'notmuch-appearance)
\r
445 (defface notmuch-search-date
\r
446 '((t :inherit default))
\r
447 "Face used in search mode for dates."
\r
449 + :group 'notmuch-search
\r
450 + :group 'notmuch-appearance)
\r
452 (defface notmuch-search-count
\r
453 '((t :inherit default))
\r
454 "Face used in search mode for the count matching the query."
\r
456 + :group 'notmuch-search
\r
457 + :group 'notmuch-appearance)
\r
459 (defface notmuch-search-subject
\r
460 '((t :inherit default))
\r
461 "Face used in search mode for subjects."
\r
463 + :group 'notmuch-search
\r
464 + :group 'notmuch-appearance)
\r
466 (defface notmuch-search-matching-authors
\r
467 '((t :inherit default))
\r
468 "Face used in search mode for authors matching the query."
\r
470 + :group 'notmuch-search
\r
471 + :group 'notmuch-appearance)
\r
473 (defface notmuch-search-non-matching-authors
\r
475 @@ -329,7 +335,8 @@ For a mouse binding, return nil."
\r
478 "Face used in search mode for authors not matching the query."
\r
480 + :group 'notmuch-search
\r
481 + :group 'notmuch-appearance)
\r
483 (defface notmuch-tag-face
\r
485 @@ -341,7 +348,8 @@ For a mouse binding, return nil."
\r
488 "Face used in search mode face for tags."
\r
490 + :group 'notmuch-search
\r
491 + :group 'notmuch-appearance)
\r
493 (defun notmuch-search-mode ()
\r
494 "Major mode displaying results of a notmuch search.
\r
495 @@ -490,7 +498,7 @@ the messages that are about to be tagged"
\r
498 :options '(hl-line-mode)
\r
500 + :group 'notmuch-hooks)
\r
502 (defcustom notmuch-after-tag-hook nil
\r
503 "Hooks that are run after tags of a message are modified.
\r
504 @@ -501,7 +509,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".
\r
505 the messages that were tagged"
\r
507 :options '(hl-line-mode)
\r
509 + :group 'notmuch-hooks)
\r
511 (defun notmuch-search-set-tags (tags)
\r
513 @@ -657,7 +665,8 @@ attributes overriding earlier. A message having both \"delete\"
\r
514 and \"unread\" tags with the above settings would have a green
\r
515 foreground and blue background."
\r
516 :type '(alist :key-type (string) :value-type (custom-face-edit))
\r
518 + :group 'notmuch-search
\r
519 + :group 'notmuch-appearance)
\r
521 (defun notmuch-search-color-line (start end line-tag-list)
\r
522 "Colorize lines in `notmuch-show' based on tags."
\r
523 @@ -952,7 +961,7 @@ the user's needs:
\r
524 2. Invoke \"notmuch new\" to incorporate the new mail
\r
525 3. Invoke one or more \"notmuch tag\" commands to classify the mail"
\r
528 + :group 'notmuch-external)
\r
530 (defun notmuch-poll ()
\r
531 "Run external script to import mail.
\r