unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: Pieter Praet <pieter@praet.org>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] emacs: logically group def{custom,face}s
Date: Sat, 14 Jan 2012 13:08:28 -0500	[thread overview]
Message-ID: <20120114180828.GD1801@mit.edu> (raw)
In-Reply-To: <1326531898-17356-1-git-send-email-pieter@praet.org>

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.

  reply	other threads:[~2012-01-14 18:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 18:33 [PATCH] emacs: logically group def{custom,face}s Pieter Praet
2011-10-10 13:49 ` Daniel Schoepe
2011-10-18 15:18   ` Jameson Graef Rollins
2011-11-01 20:00     ` Pieter Praet
2011-11-21  2:51       ` David Bremner
2012-01-12 17:12         ` [PATCH v2] " Pieter Praet
2012-01-13  3:31           ` David Bremner
2012-01-13 16:15             ` David Edmondson
2012-01-14  9:05               ` Pieter Praet
2012-01-14  9:02             ` Pieter Praet
2012-01-14  9:04               ` [PATCH] " Pieter Praet
2012-01-14 18:08                 ` Austin Clements [this message]
2012-01-14 20:12                   ` Jameson Graef Rollins
2012-01-16 10:34                   ` Pieter Praet
2012-01-16 10:38                     ` [PATCH v4] " Pieter Praet
2012-01-16 11:02                       ` David Edmondson
2012-01-16 19:16                       ` Austin Clements
2012-01-18 10:00                         ` Pieter Praet
2012-01-18 18:44                           ` Austin Clements
2012-01-19 19:10                             ` Pieter Praet
2012-01-19 19:13                               ` [PATCH] emacs: invert relation between 'notmuch-send and 'message customization groups Pieter Praet
2012-01-19 19:22                                 ` Austin Clements
2012-01-21 13:13                                 ` David Bremner
2012-01-19 17:14                       ` [PATCH v4] emacs: logically group def{custom,face}s David Bremner
2012-01-19 19:21                         ` Pieter Praet
2012-01-13 20:56           ` [PATCH v2] " Jameson Graef Rollins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120114180828.GD1801@mit.edu \
    --to=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.org \
    --cc=pieter@praet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).