unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Fix notmuch-message-mark-replied.
@ 2012-06-03 18:23 Ingo Lohmar
  2012-06-04 18:40 ` Jameson Graef Rollins
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ingo Lohmar @ 2012-06-03 18:23 UTC (permalink / raw)
  To: notmuch

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.
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Fix notmuch-message-mark-replied.
  2012-06-03 18:23 [PATCH] emacs: Fix notmuch-message-mark-replied Ingo Lohmar
@ 2012-06-04 18:40 ` Jameson Graef Rollins
  2012-07-08  6:15 ` Mark Walters
  2012-07-24 12:35 ` David Bremner
  2 siblings, 0 replies; 5+ messages in thread
From: Jameson Graef Rollins @ 2012-06-04 18:40 UTC (permalink / raw)
  To: Ingo Lohmar, notmuch

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Sun, Jun 03 2012, Ingo Lohmar <i.lohmar@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.

I guess this means that we don't have a test for reply tagging in the
emacs UI.  We probably should.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Fix notmuch-message-mark-replied.
  2012-06-03 18:23 [PATCH] emacs: Fix notmuch-message-mark-replied Ingo Lohmar
  2012-06-04 18:40 ` Jameson Graef Rollins
@ 2012-07-08  6:15 ` Mark Walters
  2012-07-17  9:31   ` Tomi Ollila
  2012-07-24 12:35 ` David Bremner
  2 siblings, 1 reply; 5+ messages in thread
From: Mark Walters @ 2012-07-08  6:15 UTC (permalink / raw)
  To: Ingo Lohmar, notmuch

On Sun, 03 Jun 2012, Ingo Lohmar <i.lohmar@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.

Best wishes

Mark

> ---
>  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
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Fix notmuch-message-mark-replied.
  2012-07-08  6:15 ` Mark Walters
@ 2012-07-17  9:31   ` Tomi Ollila
  0 siblings, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2012-07-17  9:31 UTC (permalink / raw)
  To: Mark Walters, Ingo Lohmar, notmuch

On Sun, Jul 08 2012, Mark Walters wrote:

> On Sun, 03 Jun 2012, Ingo Lohmar <i.lohmar@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] emacs: Fix notmuch-message-mark-replied.
  2012-06-03 18:23 [PATCH] emacs: Fix notmuch-message-mark-replied Ingo Lohmar
  2012-06-04 18:40 ` Jameson Graef Rollins
  2012-07-08  6:15 ` Mark Walters
@ 2012-07-24 12:35 ` David Bremner
  2 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2012-07-24 12:35 UTC (permalink / raw)
  To: Ingo Lohmar, notmuch

Ingo Lohmar <i.lohmar@gmail.com> writes:

> 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.

pushed,

d

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-24 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-03 18:23 [PATCH] emacs: Fix notmuch-message-mark-replied Ingo Lohmar
2012-06-04 18:40 ` Jameson Graef Rollins
2012-07-08  6:15 ` Mark Walters
2012-07-17  9:31   ` Tomi Ollila
2012-07-24 12:35 ` David Bremner

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).