[PATCH] emacs: Fix notmuch-message-mark-replied.
Tomi Ollila
tomi.ollila at iki.fi
Tue Jul 17 02:31:15 PDT 2012
On Sun, Jul 08 2012, Mark Walters wrote:
> On Sun, 03 Jun 2012, Ingo Lohmar <i.lohmar at gmail.com> wrote:
>> notmuch-message-mark-replied used "apply" to change message tags
>> according to notmuch-message-replied-tags after sending a reply. This
>> works if the latter is a single-element list. But with the recently
>> changed format of tag changes, it breaks for multiple-element lists.
>> Use "funcall" to properly pass the list of tag changes as a single
>> argument.
>
> This looks correct to me: the bug is still in current master and this
> does fix it.
>
> As Jamie says, it would be nice to have a test. Unfortunately, that is
> beyond my test/emacs skills.
>
> Note this bug does not occur with default configuration but the option
> is a defcustom option, and following the example in that option's
> documentation will cause the problem.
>
> Since this patch has been around for over a month I think it should
> probably be applied.
I just tested this, without the patch setting multiple tags in reply
fails with pretty ugly error message. with the patch setting one or
multiple tags works.
The fix is trivial (and obvious if one looks at it).
I remove the needs-review tag.
>
> Best wishes
>
> Mark
Tomi
>
>> ---
>> emacs/notmuch-message.el | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el
>> index 5964caa..d3738bf 100644
>> --- a/emacs/notmuch-message.el
>> +++ b/emacs/notmuch-message.el
>> @@ -45,7 +45,7 @@ the \"inbox\" and \"todo\", you would set
>> (concat "+" str)
>> str))
>> notmuch-message-replied-tags)))
>> - (apply 'notmuch-tag (notmuch-id-to-query (car (car rep))) tags)))))
>> + (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep))) tags)))))
>>
>> (add-hook 'message-send-hook 'notmuch-message-mark-replied)
>>
>> --
>> 1.7.10
More information about the notmuch
mailing list