--- /dev/null
+Return-Path: <subscribe@toshine.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 191DB431FDA\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 03:46:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id hrTEm7sfAABx for <notmuch@notmuchmail.org>;\r
+ Tue, 6 May 2014 03:46:46 -0700 (PDT)\r
+X-Greylist: delayed 433 seconds by postgrey-1.32 at olra;\r
+ Tue, 06 May 2014 03:46:45 PDT\r
+Received: from fallback-in2.mxes.net (fallback-out2.mxes.net [216.86.168.191])\r
+ by olra.theworths.org (Postfix) with ESMTP id F0AA2431FD6\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 03:46:45 -0700 (PDT)\r
+Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183])\r
+ by fallback-in1.mxes.net (Postfix) with ESMTP id 2A6892FD7AD\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 06:39:32 -0400 (EDT)\r
+Received: from wm1.irbs.net (wm1.irbs.net [216.86.168.168])\r
+ by smtp.mxes.net (Postfix) with ESMTP id 72C1250A73\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 06:39:31 -0400 (EDT)\r
+Received: from localhost (wm1.irbs.net [216.86.168.168])\r
+ by wm1.irbs.net (Postfix) with ESMTPA id 540634FE2B1\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 06:39:31 -0400 (EDT)\r
+Received: from lon.namesco.net (lon.namesco.net [195.7.254.102]) by\r
+ webmail.tuffmail.net (Horde Framework) with HTTP;\r
+ Tue, 06 May 2014 11:39:31 +0100\r
+Message-ID: <20140506113931.75041t5v5q33pvr4@webmail.tuffmail.net>\r
+Date: Tue, 06 May 2014 11:39:31 +0100\r
+From: 'Mash <subscribe@toshine.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: Notmuch-tree add/remove/toggle tag\r
+MIME-Version: 1.0\r
+Content-Type: text/plain;\r
+ charset=ISO-8859-1;\r
+ DelSp="Yes";\r
+ format="flowed"\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.0)\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 06 May 2014 10:46:54 -0000\r
+\r
+I am trying to setup a tag toggle to be used in the Notmuch-tree.\r
+\r
+I referred to "Add a key binding to add/remove/toggle a tag": =20\r
+http://notmuchmail.org/emacstips/#index8h2\r
+\r
+Looking at "notmuch-tree.el" I noticed\r
+\r
+(defun notmuch-tree-get-tags ()\r
+ "Return the tags of the current message."\r
+ (notmuch-tree-get-prop :tags))\r
+\r
+and\r
+\r
+(defun notmuch-tree-tag (tag-changes)\r
+ "Change tags for the current message"\r
+ (interactive\r
+ (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))\r
+ (notmuch-tag (notmuch-tree-get-message-id) tag-changes)\r
+ (notmuch-tree-tag-update-display tag-changes))\r
+\r
+Which in my mind would be substituted for "notmuch-show-tag-message" =20\r
+and "notmuch-show-get-tags" respectively in the "add a toggle =20\r
+"deleted" key" example.\r
+\r
+(define-key notmuch-tree-mode-map "d"\r
+ (lambda ()\r
+ "toggle deleted tag for message"\r
+ (interactive)\r
+ (notmuch-tree-tag\r
+ (if (member "deleted" (notmuch-tree-get-tags))\r
+ "-deleted" "+deleted"))))\r
+\r
+The problem is that in notmuch-tree when I get the following message: =20\r
+"Entering debugger... button-at: Args out of range: 0" and the tag =20\r
+fails to be toggled.\r
+\r
+Not quite sure where I am going wrong here?\r
+\r
+Thanks,\r
+\r
+\r