[PATCH] emacs: Add customization group for replying

Tomi Ollila tomi.ollila at iki.fi
Tue Sep 4 23:48:58 PDT 2012


On Tue, Sep 04 2012, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:

> On Tue, Sep 04 2012, Tomi Ollila wrote:
>> On Tue, Sep 04 2012, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
>>
>>> On Thu, Jul 26 2012, Michal Sojka wrote:
>>>> When one wants to customize the format of reply message, there nothing
>>>> to tell the user how to do it.  Without knowing that construction of
>>>> reply buffer is actually implemented in the message package, it seems
>>>> that replying cannot be customized.
>>>>
>>>> Because I was getting annoyed by the empty line the between citation
>>>> line and the quoted message, I figured out that changing this is fairly
>>>> easy when one knows what to customize.
>>>>
>>>> This patch adds notmuch-reply customization group that that contains
>>>> references to the relevant customization options. The new group is easy
>>>> to find as it is shown as a result of running "M-x customize-group RET
>>>> notmuch RET".
>>>
>>> Ping.
>>>
>>> Any objections against applying?
>>
>> Nobody dares to say anything due to infamiliriaty of this spesific case ;/.
>>
>> I could not find any reference this has been made before.
>
> It's at least documented at
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Group-Definitions.html
>
>   The argument members is a list specifying an initial set of
>   customization items to be members of the group. However, most often
>   members is nil, and you specify the group's members by using the
>   :group keyword when defining those members.
>
>> I could not find any discussion about this issue.
>>
>> With little effort I could not extract the customization tree to
>> stdout I could have attempted to grep whether there is same variable
>> in many groups.
>
> I tried to grep emacs sources and found the following:
>
> (defgroup message '((user-mail-address custom-variable)
> (defgroup gnus-message '((message custom-group))
> (defgroup ps-print-printer '((lpr custom-group))
> (defgroup customize '((widgets custom-group))
> (defgroup font-lock '((jit-lock custom-group))
>
> At least the first line corresponds exactly to what is proposed in my
> patch.

Yes...


I was looking whether the same customization variable has been put
into multiple groups (now those are also in message-insertion group like
you have in your patch). (So far) I haven't seen that to be done
(not that it forbids doing so, just that there aren't issues about that).

>From consistency point of view all the customization variables in notmuch
groups start with "notmuch-" and these "message-" breaks this... An
alternative to the above could be the following:

 (defgroup notmuch-reply
   '((notmuch-message-replied-tags custom-variable)
     (message-insertion custom-group))
  "..."

I.e. first moving notmuch-message-replied-tags to this new group
and (only) referencing the message-insertion group from notmuch-reply
group (the message-citation-line-format & message-citation-line-function
are the first variables in message-insertion group, which is nice).


> Cheers,
> -Michal

Tomi


More information about the notmuch mailing list