[PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:15:59 +, David Edmondson  wrote:
> On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner  
> wrote:
> > On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet  
> > wrote:
> > > To allow for expansion whilst keeping everything tidy and organized,
> > > move all defcustom/defface variables to the following subgroups,
> > > defined in notmuch-lib.el:
> > > 
> > > - Hello
> > > - Search
> > > - Show
> > > - Send
> > > - Crypto
> > > - Hooks
> > > - Appearance
> > > - External Commands
> > 
> > I didn't investigate too closely, but I noticed when I customize-group
> > emacs, each subgroup has some explanatory text beside it. Did you omit
> > that on purpose?
> 
> That should be a requirement, I think.

I agree;  But for ~every rule, there are exceptions  :)


Peace

-- 
Pieter


[PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner  wrote:
> On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet  wrote:
> > To allow for expansion whilst keeping everything tidy and organized,
> > move all defcustom/defface variables to the following subgroups,
> > defined in notmuch-lib.el:
> > 
> > - Hello
> > - Search
> > - Show
> > - Send
> > - Crypto
> > - Hooks
> > - Appearance
> > - External Commands
> 
> I didn't investigate too closely, but I noticed when I customize-group
> emacs, each subgroup has some explanatory text beside it. Did you omit
> that on purpose?
> 

That is correct.  Coming up with decent docstrings is hard :)

Also, the group names are fairly descriptive in and of themselves IMO.

Anyways, I've given it a shot, but (I hope!) people will come up with
much better descriptions, so this probably isn't the end of it...

Patch follows.

> d


Peace

-- 
Pieter


Re: [PATCH v2] emacs: logically group def{custom,face}s

2012-01-14 Thread Pieter Praet
On Fri, 13 Jan 2012 16:15:59 +, David Edmondson d...@dme.org wrote:
 On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner da...@tethera.net wrote:
  On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet pie...@praet.org wrote:
   To allow for expansion whilst keeping everything tidy and organized,
   move all defcustom/defface variables to the following subgroups,
   defined in notmuch-lib.el:
   
   - Hello
   - Search
   - Show
   - Send
   - Crypto
   - Hooks
   - Appearance
   - External Commands
  
  I didn't investigate too closely, but I noticed when I customize-group
  emacs, each subgroup has some explanatory text beside it. Did you omit
  that on purpose?
 
 That should be a requirement, I think.

I agree;  But for ~every rule, there are exceptions  :)


Peace

-- 
Pieter
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v2] emacs: logically group def{custom,face}s

2012-01-13 Thread David Edmondson
On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner  wrote:
> On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet  wrote:
> > To allow for expansion whilst keeping everything tidy and organized,
> > move all defcustom/defface variables to the following subgroups,
> > defined in notmuch-lib.el:
> > 
> > - Hello
> > - Search
> > - Show
> > - Send
> > - Crypto
> > - Hooks
> > - Appearance
> > - External Commands
> 
> I didn't investigate too closely, but I noticed when I customize-group
> emacs, each subgroup has some explanatory text beside it. Did you omit
> that on purpose?

That should be a requirement, I think.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH v2] emacs: logically group def{custom,face}s

2012-01-13 Thread Jameson Graef Rollins
On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet  wrote:
> To allow for expansion whilst keeping everything tidy and organized,
> move all defcustom/defface variables to the following subgroups,
> defined in notmuch-lib.el:

Baring the issue that the Davids brought up about the sub group
descriptions, I think this would be a nice cleanup.  +1.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



Re: [PATCH v2] emacs: logically group def{custom,face}s

2012-01-13 Thread David Edmondson
On Thu, 12 Jan 2012 23:31:34 -0400, David Bremner da...@tethera.net wrote:
 On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet pie...@praet.org wrote:
  To allow for expansion whilst keeping everything tidy and organized,
  move all defcustom/defface variables to the following subgroups,
  defined in notmuch-lib.el:
  
  - Hello
  - Search
  - Show
  - Send
  - Crypto
  - Hooks
  - Appearance
  - External Commands
 
 I didn't investigate too closely, but I noticed when I customize-group
 emacs, each subgroup has some explanatory text beside it. Did you omit
 that on purpose?

That should be a requirement, I think.


pgp1NoTetfeZy.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2] emacs: logically group def{custom,face}s

2012-01-13 Thread Jameson Graef Rollins
On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet pie...@praet.org wrote:
 To allow for expansion whilst keeping everything tidy and organized,
 move all defcustom/defface variables to the following subgroups,
 defined in notmuch-lib.el:

Baring the issue that the Davids brought up about the sub group
descriptions, I think this would be a nice cleanup.  +1.

jamie.


pgpzk6TnBEmVn.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v2] emacs: logically group def{custom,face}s

2012-01-12 Thread David Bremner
On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet  wrote:
> To allow for expansion whilst keeping everything tidy and organized,
> move all defcustom/defface variables to the following subgroups,
> defined in notmuch-lib.el:
> 
> - Hello
> - Search
> - Show
> - Send
> - Crypto
> - Hooks
> - Appearance
> - External Commands

I didn't investigate too closely, but I noticed when I customize-group
emacs, each subgroup has some explanatory text beside it. Did you omit
that on purpose?

d


[PATCH v2] emacs: logically group def{custom,face}s

2012-01-12 Thread Pieter Praet
To allow for expansion whilst keeping everything tidy and organized,
move all defcustom/defface variables to the following subgroups,
defined in notmuch-lib.el:

- Hello
- Search
- Show
- Send
- Crypto
- Hooks
- Appearance
- External Commands

As an added benefit, defcustom keyword args are now consistently
in order of appearance @ defcustom's docstring (OCD much?).
---
 emacs/notmuch-address.el |3 +-
 emacs/notmuch-crypto.el  |   22 +---
 emacs/notmuch-hello.el   |   34 ++--
 emacs/notmuch-lib.el |   44 -
 emacs/notmuch-maildir-fcc.el |6 ++--
 emacs/notmuch-message.el |2 +-
 emacs/notmuch-mua.el |   21 ++-
 emacs/notmuch-show.el|   33 ---
 emacs/notmuch.el |   35 +
 9 files changed, 131 insertions(+), 69 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 8eba7a0..2e8b840 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -28,7 +28,8 @@
 single argument and output a list of possible matches, one per
 line."
   :type 'string
-  :group 'notmuch)
+  :group 'notmuch-send
+  :group 'notmuch-external)

 (defvar notmuch-address-message-alist-member
   
'("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
index ac30098..232c1a0 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -34,38 +34,44 @@ The effect of setting this variable can be seen temporarily 
by
 providing a prefix when viewing a signed or encrypted message, or
 by providing a prefix when reloading the message in notmuch-show
 mode."
-  :group 'notmuch
-  :type 'boolean)
+  :type 'boolean
+  :group 'notmuch-crypto)

 (defface notmuch-crypto-part-header
   '((t (:foreground "blue")))
   "Face used for crypto parts headers."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (defface notmuch-crypto-signature-good
   '((t (:background "green" :foreground "black")))
   "Face used for good signatures."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (defface notmuch-crypto-signature-good-key
   '((t (:background "orange" :foreground "black")))
   "Face used for good signatures."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (defface notmuch-crypto-signature-bad
   '((t (:background "red" :foreground "black")))
   "Face used for bad signatures."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (defface notmuch-crypto-signature-unknown
   '((t (:background "red" :foreground "black")))
   "Face used for signatures of unknown status."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (defface notmuch-crypto-decryption
   '((t (:background "purple" :foreground "black")))
   "Face used for encryption/decryption status messages."
-  :group 'notmuch)
+  :group 'notmuch-crypto
+  :group 'notmuch-appearance)

 (define-button-type 'notmuch-crypto-status-button-type
   'action (lambda (button) (message (button-get button 'help-echo)))
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 333d4c1..fad9027 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -35,12 +35,12 @@
 (defcustom notmuch-recent-searches-max 10
   "The number of recent searches to store and display."
   :type 'integer
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defcustom notmuch-show-empty-saved-searches nil
   "Should saved searches with no messages be listed?"
   :type 'boolean
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defun notmuch-sort-saved-searches (alist)
   "Generate an alphabetically sorted saved searches alist."
@@ -60,7 +60,7 @@ alist to be used."
 (const :tag "Sort alphabetically" notmuch-sort-saved-searches)
 (function :tag "Custom sort function"
   :value notmuch-sort-saved-searches))
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defvar notmuch-hello-indent 4
   "How much to indent non-headers.")
@@ -68,12 +68,13 @@ alist to be used."
 (defcustom notmuch-show-logo t
   "Should the notmuch logo be shown?"
   :type 'boolean
-  :group 'notmuch)
+  :group 'notmuch-hello
+  :group 'notmuch-appearance)

 (defcustom notmuch-show-all-tags-list nil
   "Should all tags be shown in the notmuch-hello view?"
   :type 'boolean
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defcustom notmuch-hello-tag-list-make-query nil
   "Function or string to generate queries for the all tags list.
@@ -89,12 +90,12 @@ should return a filter for that tag, or nil to hide the 
tag."
 (string :tag "Custom filter"
 :value "tag:unread")
 (function :tag "Custom filter function"))
-  :group 'notmuch)
+  :group 'notmuch-hello)


Re: [PATCH v2] emacs: logically group def{custom,face}s

2012-01-12 Thread David Bremner
On Thu, 12 Jan 2012 18:12:16 +0100, Pieter Praet pie...@praet.org wrote:
 To allow for expansion whilst keeping everything tidy and organized,
 move all defcustom/defface variables to the following subgroups,
 defined in notmuch-lib.el:
 
 - Hello
 - Search
 - Show
 - Send
 - Crypto
 - Hooks
 - Appearance
 - External Commands

I didn't investigate too closely, but I noticed when I customize-group
emacs, each subgroup has some explanatory text beside it. Did you omit
that on purpose?

d
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch