* [PATCH] emacs: Add customization group for replying
@ 2012-07-26 13:58 Michal Sojka
2012-07-30 3:00 ` Jameson Graef Rollins
2012-09-04 7:35 ` Michal Sojka
0 siblings, 2 replies; 11+ messages in thread
From: Michal Sojka @ 2012-07-26 13:58 UTC (permalink / raw)
To: notmuch
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".
---
emacs/notmuch-lib.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 30db58f..47d9e0c 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -45,6 +45,17 @@
"Showing messages and threads."
:group 'notmuch)
+(defgroup notmuch-reply
+ '((message-citation-line-function custom-variable)
+ (message-citation-line-format custom-variable)
+ (message-insertion custom-group))
+ "Replying to messages.
+
+Replying in notmuch can be customized in `Message insertion'
+group. However, the most important options from that group are
+also included here."
+ :group 'notmuch)
+
(defgroup notmuch-send nil
"Sending messages from Notmuch."
:group 'notmuch)
--
1.7.10
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-07-26 13:58 [PATCH] emacs: Add customization group for replying Michal Sojka
@ 2012-07-30 3:00 ` Jameson Graef Rollins
2012-09-04 7:35 ` Michal Sojka
1 sibling, 0 replies; 11+ messages in thread
From: Jameson Graef Rollins @ 2012-07-30 3:00 UTC (permalink / raw)
To: Michal Sojka, notmuch
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
On Thu, Jul 26 2012, Michal Sojka <sojkam1@fel.cvut.cz> 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".
This is an interesting idea, to add customizations for other packages
that are related to notmuch to the notmuch config groups. I think it
could be very useful. Anyone see any drawbacks to this? If not, I
support doing this, and even extending it for other customization groups
as well.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-07-26 13:58 [PATCH] emacs: Add customization group for replying Michal Sojka
2012-07-30 3:00 ` Jameson Graef Rollins
@ 2012-09-04 7:35 ` Michal Sojka
2012-09-04 9:13 ` Tomi Ollila
2012-09-04 12:16 ` Michal Nazarewicz
1 sibling, 2 replies; 11+ messages in thread
From: Michal Sojka @ 2012-09-04 7:35 UTC (permalink / raw)
To: notmuch
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?
-Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 7:35 ` Michal Sojka
@ 2012-09-04 9:13 ` Tomi Ollila
2012-09-04 16:29 ` Michal Sojka
2012-09-04 12:16 ` Michal Nazarewicz
1 sibling, 1 reply; 11+ messages in thread
From: Tomi Ollila @ 2012-09-04 9:13 UTC (permalink / raw)
To: Michal Sojka, notmuch
On Tue, Sep 04 2012, Michal Sojka <sojkam1@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.
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.
The code in custom.el & cus-edit.el is so complex I could not figure
out whether there is any problems having variable in many groups
(put apparently the changed variable is not written twice to the
customization block).
I do like the feature but with this knowledge I have I just cannot
promote applying (I sure am not against :)
> -Michal
Tomi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 9:13 ` Tomi Ollila
@ 2012-09-04 16:29 ` Michal Sojka
2012-09-05 6:48 ` Tomi Ollila
0 siblings, 1 reply; 11+ messages in thread
From: Michal Sojka @ 2012-09-04 16:29 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Tue, Sep 04 2012, Tomi Ollila wrote:
> On Tue, Sep 04 2012, Michal Sojka <sojkam1@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.
Cheers,
-Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 16:29 ` Michal Sojka
@ 2012-09-05 6:48 ` Tomi Ollila
2012-09-06 8:10 ` Michal Sojka
0 siblings, 1 reply; 11+ messages in thread
From: Tomi Ollila @ 2012-09-05 6:48 UTC (permalink / raw)
To: Michal Sojka, notmuch
On Tue, Sep 04 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> On Tue, Sep 04 2012, Tomi Ollila wrote:
>> On Tue, Sep 04 2012, Michal Sojka <sojkam1@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-05 6:48 ` Tomi Ollila
@ 2012-09-06 8:10 ` Michal Sojka
2012-09-06 9:00 ` Tomi Ollila
0 siblings, 1 reply; 11+ messages in thread
From: Michal Sojka @ 2012-09-06 8:10 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Wed, Sep 05 2012, Tomi Ollila wrote:
> On Tue, Sep 04 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
>
>> On Tue, Sep 04 2012, Tomi Ollila wrote:
>>> On Tue, Sep 04 2012, Michal Sojka <sojkam1@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))
> "..."
Why not. Updated patch follows...
-Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-06 8:10 ` Michal Sojka
@ 2012-09-06 9:00 ` Tomi Ollila
0 siblings, 0 replies; 11+ messages in thread
From: Tomi Ollila @ 2012-09-06 9:00 UTC (permalink / raw)
To: Michal Sojka, notmuch
On Thu, Sep 06 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> On Wed, Sep 05 2012, Tomi Ollila wrote:
>>
>> 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))
>> "..."
>
> Why not. Updated patch follows...
Ok, next iteration after that is partly my fault ;/
> -Michal
Tomi
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 7:35 ` Michal Sojka
2012-09-04 9:13 ` Tomi Ollila
@ 2012-09-04 12:16 ` Michal Nazarewicz
2012-09-04 16:33 ` Michal Sojka
1 sibling, 1 reply; 11+ messages in thread
From: Michal Nazarewicz @ 2012-09-04 12:16 UTC (permalink / raw)
To: Michal Sojka, notmuch
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
On Thu, Jul 26 2012, Michal Sojka wrote:
> 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.
On semi-related note, does anyone know how to get rid of an empty line
*above* the attribution line?
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 12:16 ` Michal Nazarewicz
@ 2012-09-04 16:33 ` Michal Sojka
2012-09-04 17:20 ` Michal Nazarewicz
0 siblings, 1 reply; 11+ messages in thread
From: Michal Sojka @ 2012-09-04 16:33 UTC (permalink / raw)
To: Michal Nazarewicz, notmuch
On Tue, Sep 04 2012, Michal Nazarewicz wrote:
> On Thu, Jul 26 2012, Michal Sojka wrote:
>> 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.
>
> On semi-related note, does anyone know how to get rid of an empty line
> *above* the attribution line?
It is probably caused by your configuration. I do not have any empty
line above attribution line neither in my configuration nor when I run
emacs with -q.
-Michal
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] emacs: Add customization group for replying
2012-09-04 16:33 ` Michal Sojka
@ 2012-09-04 17:20 ` Michal Nazarewicz
0 siblings, 0 replies; 11+ messages in thread
From: Michal Nazarewicz @ 2012-09-04 17:20 UTC (permalink / raw)
To: Michal Sojka, notmuch
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
> On Tue, Sep 04 2012, Michal Nazarewicz wrote:
>> On semi-related note, does anyone know how to get rid of an empty line
>> *above* the attribution line?
On Tue, Sep 04 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> It is probably caused by your configuration. I do not have any empty
> line above attribution line neither in my configuration nor when I run
> emacs with -q.
Thanks, yes, it seems to be the case. I'll have to look at it more
closely...
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-09-06 9:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 13:58 [PATCH] emacs: Add customization group for replying Michal Sojka
2012-07-30 3:00 ` Jameson Graef Rollins
2012-09-04 7:35 ` Michal Sojka
2012-09-04 9:13 ` Tomi Ollila
2012-09-04 16:29 ` Michal Sojka
2012-09-05 6:48 ` Tomi Ollila
2012-09-06 8:10 ` Michal Sojka
2012-09-06 9:00 ` Tomi Ollila
2012-09-04 12:16 ` Michal Nazarewicz
2012-09-04 16:33 ` Michal Sojka
2012-09-04 17:20 ` Michal Nazarewicz
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).