From 1889f66d451930782e1a0561bdf6bb76775135c2 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 17 Jul 2012 12:31:15 +0300 Subject: [PATCH] Re: [PATCH] emacs: Fix notmuch-message-mark-replied. --- 91/1adc9fe688f560b5a3039756aab2b7604e9689 | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 91/1adc9fe688f560b5a3039756aab2b7604e9689 diff --git a/91/1adc9fe688f560b5a3039756aab2b7604e9689 b/91/1adc9fe688f560b5a3039756aab2b7604e9689 new file mode 100644 index 000000000..f89aa6c67 --- /dev/null +++ b/91/1adc9fe688f560b5a3039756aab2b7604e9689 @@ -0,0 +1,107 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id C1A17431FAF + for ; Tue, 17 Jul 2012 02:31:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id r3oDuFW+Wo6q for ; + Tue, 17 Jul 2012 02:31:06 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id E9748431FAE + for ; Tue, 17 Jul 2012 02:31:05 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 569BD10014D; Tue, 17 Jul 2012 12:31:15 +0300 (EEST) +From: Tomi Ollila +To: Mark Walters , + Ingo Lohmar , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: Fix notmuch-message-mark-replied. +In-Reply-To: <87bojqrd6d.fsf@qmul.ac.uk> +References: <87vcj8ckzm.fsf@acer.localhost.com> <87bojqrd6d.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.13.2+93~ge4fdd97 (http://notmuchmail.org) Emacs/23.1.1 + (x86_64-redhat-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 17 Jul 2012 09:31:06 -0000 + +On Sun, Jul 08 2012, Mark Walters wrote: + +> On Sun, 03 Jun 2012, Ingo Lohmar 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 -- 2.26.2