Re: [PATCH] emacs: logically group def{custom,face}s
authorAustin Clements <amdragon@MIT.EDU>
Sat, 14 Jan 2012 18:08:28 +0000 (13:08 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:09 +0000 (09:42 -0800)
8d/e9c26a6e85f7c1d380a9d1bd3929cf07fb853c [new file with mode: 0644]

diff --git a/8d/e9c26a6e85f7c1d380a9d1bd3929cf07fb853c b/8d/e9c26a6e85f7c1d380a9d1bd3929cf07fb853c
new file mode 100644 (file)
index 0000000..c2bb97b
--- /dev/null
@@ -0,0 +1,194 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 12056429E30\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 10:08:59 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id w7MXGue5u+q7 for <notmuch@notmuchmail.org>;\r
+       Sat, 14 Jan 2012 10:08:58 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 60A82429E29\r
+       for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 10:08:58 -0800 (PST)\r
+X-AuditID: 12074422-b7fd66d0000008f9-9b-4f11c4b80e59\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 16.5B.02297.8B4C11F4; Sat, 14 Jan 2012 13:08:56 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q0EI8kaH030804; \r
+       Sat, 14 Jan 2012 13:08:47 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0EI8Ujk015278\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sat, 14 Jan 2012 13:08:45 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Rm81k-0001wk-3C; Sat, 14 Jan 2012 13:08:28 -0500\r
+Date: Sat, 14 Jan 2012 13:08:28 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Pieter Praet <pieter@praet.org>\r
+Subject: Re: [PATCH] emacs: logically group def{custom,face}s\r
+Message-ID: <20120114180828.GD1801@mit.edu>\r
+References: <87ty3ypsgp.fsf@praet.org>\r
+       <1326531898-17356-1-git-send-email-pieter@praet.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1326531898-17356-1-git-send-email-pieter@praet.org>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IR4hRV1t1xRNDf4PAUfosbrd2MFtdvzmS2\r
+       +P36BrMDs8ezVbeYPTr2XWb12HLoPXMAcxSXTUpqTmZZapG+XQJXRk/jO7aCY9IVV3Y5NjC+\r
+       Fe1i5OSQEDCRuPhtKROELSZx4d56ti5GLg4hgX2MEvOuLWSHcDYwSsx8cgbKOckk8XE5SAuI\r
+       s4RRouvgWWaQfhYBVYmdE9axgNhsAhoS2/YvZwSxRQSUJU4/+ckOYjML+ErM/fQDrF5YwFai\r
+       bf0ksHpeAW2J5sZdYHEhgViJV7v6WCHighInZz5hgejVkrjx7yXQYg4gW1pi+T8OkDCngKPE\r
+       +olbwMaLCqhITDm5jW0Co9AsJN2zkHTPQuhewMi8ilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdU\r
+       LzezRC81pXQTIyjU2V2UdjD+PKh0iFGAg1GJh7cwR8BfiDWxrLgy9xCjJAeTkijv+cOC/kJ8\r
+       SfkplRmJxRnxRaU5qcWHGCU4mJVEeO8tBsrxpiRWVqUW5cOkpDlYlMR51bXe+QkJpCeWpGan\r
+       phakFsFkZTg4lCR47YExLSRYlJqeWpGWmVOCkGbi4AQZzgM03Bikhre4IDG3ODMdIn+KUVFK\r
+       nFcUJCEAksgozYPrhaWiV4ziQK8I80qAVPEA0xhc9yugwUxAg8tS+EAGlyQipKQaGM3XnbF9\r
+       YlpxIcZt8qR7fu08t/qL+Uvf2Mixmj2wk1RYlxcdaPTY92rUomO3L363e3muJ8C/LGD9dhu3\r
+       kutTy7T5LH0vPXLcl9rn5TSPY8Fd1R8qO2ecFjM95H81ySaGaYlrJceOj+m94fufztCvjLD8\r
+       Xpk/43XRl1Obq1nnZBlGnWeddYLrtBJLcUaioRZzUXEiAPBH7UYgAwAA\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 14 Jan 2012 18:08:59 -0000\r
+\r
+Quoth Pieter Praet on Jan 14 at 10:04 am:\r
+> To allow for expansion whilst keeping everything tidy and organized,\r
+> move all defcustom/defface variables to the following subgroups,\r
+> defined in notmuch-lib.el:\r
+> \r
+> - Hello\r
+> - Search\r
+> - Show\r
+> - Send\r
+> - Crypto\r
+> - Hooks\r
+> - External Commands\r
+> - Appearance\r
+> \r
+> As an added benefit, defcustom keyword args are now consistently\r
+> in order of appearance @ defcustom's docstring (OCD much?).\r
+\r
+Thanks for doing this.  I recently went into customize-group notmuch\r
+and was overwhelmed by the pile of options presented.\r
+\r
+> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> index 0f856bf..f6f48e9 100644\r
+> --- a/emacs/notmuch-lib.el\r
+> +++ b/emacs/notmuch-lib.el\r
+> @@ -28,17 +28,58 @@\r
+>    "Notmuch mail reader for Emacs."\r
+>    :group 'mail)\r
+>  \r
+\r
+Group docstrings aren't generally of the form "Options concerning\r
+..."; they just jump into what they concern.  E.g.,\r
+\r
+Convenience : Convenience features for faster editing.\r
+\r
+Calendar Hooks : Calendar hooks.\r
+\r
+Also, all but one of the tags you give the groups would be\r
+automatically derived by Emacs, so you can remove those.\r
+\r
+> +(defgroup notmuch-hello nil\r
+> +  "Options concerning `notmuch-hello-mode'."\r
+> +  :tag "Notmuch Hello"\r
+> +  :group 'notmuch)\r
+\r
+Perhaps "Overview of saved searches, tags, etc."\r
+\r
+> +\r
+> +(defgroup notmuch-search nil\r
+> +  "Options concerning `notmuch-search-mode'."\r
+> +  :tag "Notmuch Search"\r
+> +  :group 'notmuch)\r
+\r
+"Searching and sorting mail"?\r
+\r
+> +\r
+> +(defgroup notmuch-show nil\r
+> +  "Options concerning `notmuch-show-mode'."\r
+> +  :tag "Notmuch Show"\r
+> +  :group 'notmuch)\r
+\r
+"Showing messages and threads"?\r
+\r
+> +\r
+> +(defgroup notmuch-send nil\r
+> +  "Options concerning the sending of messages."\r
+> +  :tag "Notmuch Send"\r
+> +  :group 'notmuch)\r
+\r
+"Sending messages from Notmuch"?\r
+\r
+We should probably link to the 'message group, perhaps by adding\r
+  :link '(custom-group-link message)\r
+here or maybe to the notmuch group itself.  Unfortunately, I don't\r
+think you can actually add a group to another group after it's been\r
+defined (though I could be wrong).\r
+\r
+> +\r
+> +(defgroup notmuch-crypto nil\r
+> +  "Options concerning the processing and fontification of\r
+> +cryptographic MIME parts in `notmuch-show-mode'."\r
+> +  :tag "Notmuch Crypto"\r
+> +  :group 'notmuch)\r
+\r
+"Processing and display of cryptographic MIME parts"?  (You also don't\r
+want the docstring to be too long, given how it's displayed.)\r
+\r
+> +\r
+> +(defgroup notmuch-hooks nil\r
+> +  "Run custom code on well-defined occasions."\r
+> +  :tag "Notmuch Hooks"\r
+> +  :group 'notmuch)\r
+> +\r
+> +(defgroup notmuch-external nil\r
+> +  "Run more custom code on different well-defined occasions."\r
+> +  :tag "Notmuch External Commands"\r
+> +  :group 'notmuch)\r
+\r
+Oof!  It's okay to be a little redundant in the docstring.  Core Emacs\r
+options do it.  "External commands"?\r
+\r
+> +\r
+> +(defgroup notmuch-appearance nil\r
+> +  "Options concerning how Notmuch looks."\r
+> +  :tag "Notmuch Appearance"\r
+> +  :group 'notmuch)\r
+\r
+"How Notmuch looks"?\r
+\r
+I worry that notmuch-appearance is a catch-all that most options\r
+arguably fit in to.  In particular, some notmuch-show options are also\r
+in this group and some aren't and it's not clear to me what the rule\r
+is.\r
+\r
+Perhaps this should be notmuch-faces and limited to just faces (and\r
+maybe options that aren't technically faces but that affect face\r
+selection)?  Then the grouping rule would be obvious, like it is for\r
+all of the other groups.\r