From 09bfc9a8d49401dd878e1859f842e4b54ec0adb7 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Tue, 3 Apr 2012 01:42:09 +1700 Subject: [PATCH] Re: Can't run my functions using notmuch--add-tag since update --- 5b/cec50748b3227c3cc45e969e9f404f8fe884a2 | 137 ++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 5b/cec50748b3227c3cc45e969e9f404f8fe884a2 diff --git a/5b/cec50748b3227c3cc45e969e9f404f8fe884a2 b/5b/cec50748b3227c3cc45e969e9f404f8fe884a2 new file mode 100644 index 000000000..a6fd0843a --- /dev/null +++ b/5b/cec50748b3227c3cc45e969e9f404f8fe884a2 @@ -0,0 +1,137 @@ +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 E7FEF431FC7 + for ; Mon, 2 Apr 2012 01:42:13 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 b6DwQ5E9oOzN for ; + Mon, 2 Apr 2012 01:42:13 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id 4A16E431FC2 + for ; Mon, 2 Apr 2012 01:42:13 -0700 (PDT) +Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by earth-doxen-postvirus (Postfix) with ESMTP id 25AB666E00E4; + Mon, 2 Apr 2012 01:42:13 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new +Received: from finestructure.net (unknown [76.89.193.65]) + (Authenticated sender: jrollins) + by earth-doxen-submit (Postfix) with ESMTP id 4963266E00C0; + Mon, 2 Apr 2012 01:42:10 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id F375C89A; Mon, 2 Apr 2012 01:42:09 -0700 (PDT) +From: Jameson Graef Rollins +To: Albin Stjerna , + Notmuch Mail +Subject: Re: Can't run my functions using notmuch--add-tag since + update +In-Reply-To: <87y5qey3b5.fsf@hecate.student.uu.se> +References: <87y5qey3b5.fsf@hecate.student.uu.se> +User-Agent: Notmuch/0.12+87~g3c4c85f (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Mon, 02 Apr 2012 01:42:09 -0700 +Message-ID: <8762di5xum.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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: Mon, 02 Apr 2012 08:42:14 -0000 + +--=-=-= +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +On Mon, Apr 02 2012, Albin Stjerna wrote: +> I have a number of functions in my Emacs config to add standard tags to e= +mails in notmuch. Since a recent upgrade of notmuch on debian testing (curr= +ent version 0.12, not sure what the older version was), these functions no = +longer seem to work. For example, running this function: +> +> (defun notmuch-show-read/review () +> (interactive) +> (notmuch-show-add-tag "read/review") +> (notmuch-show-archive-thread)) +> +> will produce the following error: +> +> notmuch-show-read/review: Wrong number of arguments: #[nil "=C3=80=C3=81!= +=C2=87" [notmuch-show-tag "+"] 2 ("/usr/share/emacs-snapshot/site-lisp/notm= +uch/notmuch-show.elc" . 53071) nil], 1 +> +> What has changed, and what can I do to fix this problem? The docstrings f= +or the functions I use doesn't really give any clues. + +Hi, Albin. Yes, there were some recent changes to how tagging is +handled that has caused a bit of confusion. I think we might also need +to tweak it a bit more to get it right. Sorry you ran into trouble. + +However, in the mean time, I think you will need to modify your function +as such: + +(defun notmuch-show-read/review () + (interactive) + (notmuch-show-tag-message "+read/review") + (notmuch-show-archive-thread)) + +Note the new tagging function is notmuch-show-tag-message, and the +tagging operation has to include the sign. + +I think this interface can be cleaned up considerably, and I have some +ideas how (based on improvements I just submitted for search-mode [0]). + +[0] id:"1333354853-25729-1-git-send-email-jrollins@finestructure.net" + +Note, there are also now a suite of show-mode archiving functions, +depending on your needs: + + notmuch-show-archive-thread + notmuch-show-archive-thread-then-next + notmuch-show-archive-thread-then-exit + notmuch-show-archive-message + notmuch-show-archive-message-then-next-or-exit + notmuch-show-archive-message-then-next-or-next-thread + +hth, and good luck. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIcBAEBCAAGBQJPeWZhAAoJEO00zqvie6q8s4wP/2+EDUkvU9kcQmEVD153twQV +/nj9xfYzZGSAi+KiGmNUx2mO2Zw59tR5qZY5OhZuxzZEJ0kP7ngnFKM98nE/+r9r +SSOITkFbsemGCOGMf5gLp1l56bU8oDxyvA9hW58VsyTeSu0Tdy+UWdgQGhzkJmwH +K9h/JXCL9wMlvxw3fqqqxouxWevZRpHlQCzhRM616ndUuC21vzhNp+0aUU8DmVNf +FiiHMnaXeIKYU0wj/OZFJM/4kPAFZ1wl9SZCcnZi8ttM6vL32VpeEtVHo8LSyZU1 +PuYOIVZYJ6PiqKBZu3FmeCdyPEwUqRoSXRvBgd/n85yTPZTsvkqMr3B466tU2nDo ++2bcJ38ysAUCkyPDi6P2huTlwXPEjqjX9X2jYOY9fl3R9c7WDymLparP8QrtjjEO +29RaKtyw3RaMqeX/TN7qZZ+iBAwWlbWsb5oYbqCuAXMsZ4WZbW35u8/8E56TsbDH +5qji3/nx27/eT0tvCiQrPpzr+ohMbDf3uH0qKX/eolNaySS7yK5raBu+2d+myKQl +PHJHil6aOl2MpO6SV4N1DeCMD01bYATeDdnFjeC2UVKXIdmJiyB5XukRCJD/r9+w +nTBYS3deH0YF6sMXJOl+z6Wd6sa5uCAh3PTa8aDtxvgqLtE3qVoKzp/a8ThS5GDT +N545lSQKqTYTOEU2L4sT +=a3il +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2