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

2012-01-16 Thread Pieter Praet
On Sat, 14 Jan 2012 13:08:28 -0500, Austin Clements  wrote:
> Quoth Pieter Praet on Jan 14 at 10:04 am:
> > 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
> > - External Commands
> > - Appearance
> > 
> > As an added benefit, defcustom keyword args are now consistently
> > in order of appearance @ defcustom's docstring (OCD much?).
> 
> Thanks for doing this. [...]

You're very welcome!

> [...] I recently went into customize-group notmuch
> and was overwhelmed by the pile of options presented.
> 

Same here :)

> > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> > index 0f856bf..f6f48e9 100644
> > --- a/emacs/notmuch-lib.el
> > +++ b/emacs/notmuch-lib.el
> > @@ -28,17 +28,58 @@
> >"Notmuch mail reader for Emacs."
> >:group 'mail)
> >  
> 
> Group docstrings aren't generally of the form "Options concerning
> ..."; they just jump into what they concern.  E.g.,
> 
> Convenience : Convenience features for faster editing.
> 
> Calendar Hooks : Calendar hooks.
> 

Couldn't agree more!  I must admit, I was rather apathetic at the
time due to a lack of sleep.

> Also, all but one of the tags you give the groups would be
> automatically derived by Emacs, so you can remove those.
> 

How very convenient.  Removed 'em all: the one @ `notmuch-external'
was pretty pointless as well.

> > +(defgroup notmuch-hello nil
> > +  "Options concerning `notmuch-hello-mode'."
> > +  :tag "Notmuch Hello"
> > +  :group 'notmuch)
> 
> Perhaps "Overview of saved searches, tags, etc."
> 
> > +
> > +(defgroup notmuch-search nil
> > +  "Options concerning `notmuch-search-mode'."
> > +  :tag "Notmuch Search"
> > +  :group 'notmuch)
> 
> "Searching and sorting mail"?
> 
> > +
> > +(defgroup notmuch-show nil
> > +  "Options concerning `notmuch-show-mode'."
> > +  :tag "Notmuch Show"
> > +  :group 'notmuch)
> 
> "Showing messages and threads"?
> 
> > +
> > +(defgroup notmuch-send nil
> > +  "Options concerning the sending of messages."
> > +  :tag "Notmuch Send"
> > +  :group 'notmuch)
> 
> "Sending messages from Notmuch"?
> 
> We should probably link to the 'message group, perhaps by adding
>   :link '(custom-group-link message)
> here or maybe to the notmuch group itself.  Unfortunately, I don't
> think you can actually add a group to another group after it's been
> defined (though I could be wrong).
> 

Agreed.  I've added `notmuch-send' to the `message' group.

> > +
> > +(defgroup notmuch-crypto nil
> > +  "Options concerning the processing and fontification of
> > +cryptographic MIME parts in `notmuch-show-mode'."
> > +  :tag "Notmuch Crypto"
> > +  :group 'notmuch)
> 
> "Processing and display of cryptographic MIME parts"?  (You also don't
> want the docstring to be too long, given how it's displayed.)
> 
> > +
> > +(defgroup notmuch-hooks nil
> > +  "Run custom code on well-defined occasions."
> > +  :tag "Notmuch Hooks"
> > +  :group 'notmuch)
> > +
> > +(defgroup notmuch-external nil
> > +  "Run more custom code on different well-defined occasions."
> > +  :tag "Notmuch External Commands"
> > +  :group 'notmuch)
> 
> Oof!  It's okay to be a little redundant in the docstring.  Core Emacs
> options do it.  "External commands"?
> 
> > +
> > +(defgroup notmuch-appearance nil
> > +  "Options concerning how Notmuch looks."
> > +  :tag "Notmuch Appearance"
> > +  :group 'notmuch)
> 
> "How Notmuch looks"?
> 
> I worry that notmuch-appearance is a catch-all that most options
> arguably fit in to.  In particular, some notmuch-show options are also
> in this group and some aren't and it's not clear to me what the rule
> is.
> 
> Perhaps this should be notmuch-faces and limited to just faces (and
> maybe options that aren't technically faces but that affect face
> selection)?  Then the grouping rule would be obvious, like it is for
> all of the other groups.

That was my original intention, but due to `notmuch-hello-logo-background',
I decided to dump `notmuch-show-logo' in there as well, necessitating a
broader designation.  Fixed!

Patch follows.


Peace

-- 
Pieter


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

2012-01-16 Thread Pieter Praet
On Sat, 14 Jan 2012 13:08:28 -0500, Austin Clements amdra...@mit.edu wrote:
 Quoth Pieter Praet on Jan 14 at 10:04 am:
  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
  - External Commands
  - Appearance
  
  As an added benefit, defcustom keyword args are now consistently
  in order of appearance @ defcustom's docstring (OCD much?).
 
 Thanks for doing this. [...]

You're very welcome!

 [...] I recently went into customize-group notmuch
 and was overwhelmed by the pile of options presented.
 

Same here :)

  diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
  index 0f856bf..f6f48e9 100644
  --- a/emacs/notmuch-lib.el
  +++ b/emacs/notmuch-lib.el
  @@ -28,17 +28,58 @@
 Notmuch mail reader for Emacs.
 :group 'mail)
   
 
 Group docstrings aren't generally of the form Options concerning
 ...; they just jump into what they concern.  E.g.,
 
 Convenience : Convenience features for faster editing.
 
 Calendar Hooks : Calendar hooks.
 

Couldn't agree more!  I must admit, I was rather apathetic at the
time due to a lack of sleep.

 Also, all but one of the tags you give the groups would be
 automatically derived by Emacs, so you can remove those.
 

How very convenient.  Removed 'em all: the one @ `notmuch-external'
was pretty pointless as well.

  +(defgroup notmuch-hello nil
  +  Options concerning `notmuch-hello-mode'.
  +  :tag Notmuch Hello
  +  :group 'notmuch)
 
 Perhaps Overview of saved searches, tags, etc.
 
  +
  +(defgroup notmuch-search nil
  +  Options concerning `notmuch-search-mode'.
  +  :tag Notmuch Search
  +  :group 'notmuch)
 
 Searching and sorting mail?
 
  +
  +(defgroup notmuch-show nil
  +  Options concerning `notmuch-show-mode'.
  +  :tag Notmuch Show
  +  :group 'notmuch)
 
 Showing messages and threads?
 
  +
  +(defgroup notmuch-send nil
  +  Options concerning the sending of messages.
  +  :tag Notmuch Send
  +  :group 'notmuch)
 
 Sending messages from Notmuch?
 
 We should probably link to the 'message group, perhaps by adding
   :link '(custom-group-link message)
 here or maybe to the notmuch group itself.  Unfortunately, I don't
 think you can actually add a group to another group after it's been
 defined (though I could be wrong).
 

Agreed.  I've added `notmuch-send' to the `message' group.

  +
  +(defgroup notmuch-crypto nil
  +  Options concerning the processing and fontification of
  +cryptographic MIME parts in `notmuch-show-mode'.
  +  :tag Notmuch Crypto
  +  :group 'notmuch)
 
 Processing and display of cryptographic MIME parts?  (You also don't
 want the docstring to be too long, given how it's displayed.)
 
  +
  +(defgroup notmuch-hooks nil
  +  Run custom code on well-defined occasions.
  +  :tag Notmuch Hooks
  +  :group 'notmuch)
  +
  +(defgroup notmuch-external nil
  +  Run more custom code on different well-defined occasions.
  +  :tag Notmuch External Commands
  +  :group 'notmuch)
 
 Oof!  It's okay to be a little redundant in the docstring.  Core Emacs
 options do it.  External commands?
 
  +
  +(defgroup notmuch-appearance nil
  +  Options concerning how Notmuch looks.
  +  :tag Notmuch Appearance
  +  :group 'notmuch)
 
 How Notmuch looks?
 
 I worry that notmuch-appearance is a catch-all that most options
 arguably fit in to.  In particular, some notmuch-show options are also
 in this group and some aren't and it's not clear to me what the rule
 is.
 
 Perhaps this should be notmuch-faces and limited to just faces (and
 maybe options that aren't technically faces but that affect face
 selection)?  Then the grouping rule would be obvious, like it is for
 all of the other groups.

That was my original intention, but due to `notmuch-hello-logo-background',
I decided to dump `notmuch-show-logo' in there as well, necessitating a
broader designation.  Fixed!

Patch follows.


Peace

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


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

2012-01-14 Thread Austin Clements
Quoth Pieter Praet on Jan 14 at 10:04 am:
> 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
> - External Commands
> - Appearance
> 
> As an added benefit, defcustom keyword args are now consistently
> in order of appearance @ defcustom's docstring (OCD much?).

Thanks for doing this.  I recently went into customize-group notmuch
and was overwhelmed by the pile of options presented.

> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> index 0f856bf..f6f48e9 100644
> --- a/emacs/notmuch-lib.el
> +++ b/emacs/notmuch-lib.el
> @@ -28,17 +28,58 @@
>"Notmuch mail reader for Emacs."
>:group 'mail)
>  

Group docstrings aren't generally of the form "Options concerning
..."; they just jump into what they concern.  E.g.,

Convenience : Convenience features for faster editing.

Calendar Hooks : Calendar hooks.

Also, all but one of the tags you give the groups would be
automatically derived by Emacs, so you can remove those.

> +(defgroup notmuch-hello nil
> +  "Options concerning `notmuch-hello-mode'."
> +  :tag "Notmuch Hello"
> +  :group 'notmuch)

Perhaps "Overview of saved searches, tags, etc."

> +
> +(defgroup notmuch-search nil
> +  "Options concerning `notmuch-search-mode'."
> +  :tag "Notmuch Search"
> +  :group 'notmuch)

"Searching and sorting mail"?

> +
> +(defgroup notmuch-show nil
> +  "Options concerning `notmuch-show-mode'."
> +  :tag "Notmuch Show"
> +  :group 'notmuch)

"Showing messages and threads"?

> +
> +(defgroup notmuch-send nil
> +  "Options concerning the sending of messages."
> +  :tag "Notmuch Send"
> +  :group 'notmuch)

"Sending messages from Notmuch"?

We should probably link to the 'message group, perhaps by adding
  :link '(custom-group-link message)
here or maybe to the notmuch group itself.  Unfortunately, I don't
think you can actually add a group to another group after it's been
defined (though I could be wrong).

> +
> +(defgroup notmuch-crypto nil
> +  "Options concerning the processing and fontification of
> +cryptographic MIME parts in `notmuch-show-mode'."
> +  :tag "Notmuch Crypto"
> +  :group 'notmuch)

"Processing and display of cryptographic MIME parts"?  (You also don't
want the docstring to be too long, given how it's displayed.)

> +
> +(defgroup notmuch-hooks nil
> +  "Run custom code on well-defined occasions."
> +  :tag "Notmuch Hooks"
> +  :group 'notmuch)
> +
> +(defgroup notmuch-external nil
> +  "Run more custom code on different well-defined occasions."
> +  :tag "Notmuch External Commands"
> +  :group 'notmuch)

Oof!  It's okay to be a little redundant in the docstring.  Core Emacs
options do it.  "External commands"?

> +
> +(defgroup notmuch-appearance nil
> +  "Options concerning how Notmuch looks."
> +  :tag "Notmuch Appearance"
> +  :group 'notmuch)

"How Notmuch looks"?

I worry that notmuch-appearance is a catch-all that most options
arguably fit in to.  In particular, some notmuch-show options are also
in this group and some aren't and it's not clear to me what the rule
is.

Perhaps this should be notmuch-faces and limited to just faces (and
maybe options that aren't technically faces but that affect face
selection)?  Then the grouping rule would be obvious, like it is for
all of the other groups.


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

2012-01-14 Thread Jameson Graef Rollins
I like all of Austin's description suggestions.

jamie.


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

2012-01-14 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
- External Commands
- Appearance

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 |   45 -
 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, 132 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 02017ce..2493a26 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)

 

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

2012-01-14 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
- External Commands
- Appearance

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 |   45 -
 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, 132 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 02017ce..2493a26 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)
 
 (defcustom notmuch-hello-hide-tags nil
   List of 

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

2012-01-14 Thread Austin Clements
Quoth Pieter Praet on Jan 14 at 10:04 am:
 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
 - External Commands
 - Appearance
 
 As an added benefit, defcustom keyword args are now consistently
 in order of appearance @ defcustom's docstring (OCD much?).

Thanks for doing this.  I recently went into customize-group notmuch
and was overwhelmed by the pile of options presented.

 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
 index 0f856bf..f6f48e9 100644
 --- a/emacs/notmuch-lib.el
 +++ b/emacs/notmuch-lib.el
 @@ -28,17 +28,58 @@
Notmuch mail reader for Emacs.
:group 'mail)
  

Group docstrings aren't generally of the form Options concerning
...; they just jump into what they concern.  E.g.,

Convenience : Convenience features for faster editing.

Calendar Hooks : Calendar hooks.

Also, all but one of the tags you give the groups would be
automatically derived by Emacs, so you can remove those.

 +(defgroup notmuch-hello nil
 +  Options concerning `notmuch-hello-mode'.
 +  :tag Notmuch Hello
 +  :group 'notmuch)

Perhaps Overview of saved searches, tags, etc.

 +
 +(defgroup notmuch-search nil
 +  Options concerning `notmuch-search-mode'.
 +  :tag Notmuch Search
 +  :group 'notmuch)

Searching and sorting mail?

 +
 +(defgroup notmuch-show nil
 +  Options concerning `notmuch-show-mode'.
 +  :tag Notmuch Show
 +  :group 'notmuch)

Showing messages and threads?

 +
 +(defgroup notmuch-send nil
 +  Options concerning the sending of messages.
 +  :tag Notmuch Send
 +  :group 'notmuch)

Sending messages from Notmuch?

We should probably link to the 'message group, perhaps by adding
  :link '(custom-group-link message)
here or maybe to the notmuch group itself.  Unfortunately, I don't
think you can actually add a group to another group after it's been
defined (though I could be wrong).

 +
 +(defgroup notmuch-crypto nil
 +  Options concerning the processing and fontification of
 +cryptographic MIME parts in `notmuch-show-mode'.
 +  :tag Notmuch Crypto
 +  :group 'notmuch)

Processing and display of cryptographic MIME parts?  (You also don't
want the docstring to be too long, given how it's displayed.)

 +
 +(defgroup notmuch-hooks nil
 +  Run custom code on well-defined occasions.
 +  :tag Notmuch Hooks
 +  :group 'notmuch)
 +
 +(defgroup notmuch-external nil
 +  Run more custom code on different well-defined occasions.
 +  :tag Notmuch External Commands
 +  :group 'notmuch)

Oof!  It's okay to be a little redundant in the docstring.  Core Emacs
options do it.  External commands?

 +
 +(defgroup notmuch-appearance nil
 +  Options concerning how Notmuch looks.
 +  :tag Notmuch Appearance
 +  :group 'notmuch)

How Notmuch looks?

I worry that notmuch-appearance is a catch-all that most options
arguably fit in to.  In particular, some notmuch-show options are also
in this group and some aren't and it's not clear to me what the rule
is.

Perhaps this should be notmuch-faces and limited to just faces (and
maybe options that aren't technically faces but that affect face
selection)?  Then the grouping rule would be obvious, like it is for
all of the other groups.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


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

2012-01-14 Thread Jameson Graef Rollins
I like all of Austin's description suggestions.

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


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

2011-11-20 Thread David Bremner
On Tue, 01 Nov 2011 21:00:28 +0100, Pieter Praet  wrote:
> 
> Thanks for testing, Daniel and Jameson!
> 
> It still applies cleanly, so if there's anything preventing it from
> being merged in, I'd like to hear about it.
> 

Oops. Some time in the last few weeks, it stopped applying cleanly.

d


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

2011-11-20 Thread David Bremner
On Tue, 01 Nov 2011 21:00:28 +0100, Pieter Praet pie...@praet.org wrote:
 
 Thanks for testing, Daniel and Jameson!
 
 It still applies cleanly, so if there's anything preventing it from
 being merged in, I'd like to hear about it.
 

Oops. Some time in the last few weeks, it stopped applying cleanly.

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


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

2011-11-01 Thread Pieter Praet
On Tue, 18 Oct 2011 08:18:18 -0700, Jameson Graef Rollins  wrote:
> On Mon, 10 Oct 2011 15:49:03 +0200, Daniel Schoepe  
> wrote:
> > On Tue,  5 Jul 2011 20:33:00 +0200, 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:
> > 
> > Since the customize page for notmuch is getting pretty crowded, I think
> > this patch is a good idea and should be applied.
> 
> Agreed.
> 
> jamie.

Thanks for testing, Daniel and Jameson!

It still applies cleanly, so if there's anything preventing it from
being merged in, I'd like to hear about it.


Peace

-- 
Pieter


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

2011-11-01 Thread Pieter Praet
On Tue, 18 Oct 2011 08:18:18 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 On Mon, 10 Oct 2011 15:49:03 +0200, Daniel Schoepe dan...@schoepe.org wrote:
  On Tue,  5 Jul 2011 20:33:00 +0200, 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:
  
  Since the customize page for notmuch is getting pretty crowded, I think
  this patch is a good idea and should be applied.
 
 Agreed.
 
 jamie.

Thanks for testing, Daniel and Jameson!

It still applies cleanly, so if there's anything preventing it from
being merged in, I'd like to hear about it.


Peace

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


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

2011-10-18 Thread Jameson Graef Rollins
On Mon, 10 Oct 2011 15:49:03 +0200, Daniel Schoepe  
wrote:
> On Tue,  5 Jul 2011 20:33:00 +0200, 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:
> 
> Since the customize page for notmuch is getting pretty crowded, I think
> this patch is a good idea and should be applied.

Agreed.

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] emacs: logically group def{custom,face}s

2011-10-18 Thread Jameson Graef Rollins
On Mon, 10 Oct 2011 15:49:03 +0200, Daniel Schoepe dan...@schoepe.org wrote:
 On Tue,  5 Jul 2011 20:33:00 +0200, 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:
 
 Since the customize page for notmuch is getting pretty crowded, I think
 this patch is a good idea and should be applied.

Agreed.

jamie.


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


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

2011-10-10 Thread Daniel Schoepe
On Tue,  5 Jul 2011 20:33:00 +0200, 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:

Since the customize page for notmuch is getting pretty crowded, I think
this patch is a good idea and should be applied.

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



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

2011-10-10 Thread Daniel Schoepe
On Tue,  5 Jul 2011 20:33:00 +0200, 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:

Since the customize page for notmuch is getting pretty crowded, I think
this patch is a good idea and should be applied.

Cheers,
Daniel


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


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

2011-07-05 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

Signed-off-by: Pieter Praet 
---
 emacs/notmuch-address.el |3 +-
 emacs/notmuch-crypto.el  |   17 ++-
 emacs/notmuch-hello.el   |   20 ++
 emacs/notmuch-lib.el |   44 -
 emacs/notmuch-maildir-fcc.el |2 +-
 emacs/notmuch-message.el |2 +-
 emacs/notmuch-mua.el |   11 +
 emacs/notmuch-show.el|   14 ++--
 emacs/notmuch.el |   35 +
 9 files changed, 103 insertions(+), 45 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 1a7c577..553a04e 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 f03266f..b8132f5 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -33,33 +33,38 @@ validity of user ID of the signer.
 The effect of setting this variable can be seen temporarily by
 viewing a signed or encrypted message with M-RET in notmuch
 search."
-  :group 'notmuch
+  :group 'notmuch-crypto
   :type 'boolean)

 (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 65fde75..060ffe4 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)

 (defvar notmuch-hello-indent 4
   "How much to indent non-headers.")
@@ -48,12 +48,13 @@
 (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.
@@ -68,12 +69,12 @@ should return a filter for that tag, or nil to hide the 
tag."
 (const :tag "Unread messages" "tag:unread")
 (const :tag "Custom filter" string)
 (const :tag "Custom filter function" function))
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defcustom notmuch-hello-hide-tags nil
   "List of tags to be hidden in the \"all tags\"-section."
   :type '(repeat string)
-  :group 'notmuch)
+  :group 'notmuch-hello)

 (defface notmuch-hello-logo-background
   'class color)
@@ -83,7 +84,8 @@ should return a filter for that tag, or nil to hide the tag."
   (background light))
  (:background "white")))
   "Background colour for the notmuch logo."
-  :group 'notmuch)
+  :group 'notmuch-hello
+  :group 'notmuch-appearance)

 (defcustom notmuch-column-control t
   "Controls the number of columns for saved searches/tags in notmuch view.
@@ -105,7 +107,7 @@ So:
   30.
 - if you don't want to worry about all of this nonsense, leave
   this set to `t'."
-  :group 'notmuch
+  :group