--- /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 1ADB3431FDC\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 04:18:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+ tests=[MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7]\r
+ 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 KiY5BfhH8VCT for <notmuch@notmuchmail.org>;\r
+ Tue, 6 May 2014 04:18:20 -0700 (PDT)\r
+Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 15349431FD6\r
+ for <notmuch@notmuchmail.org>; Tue, 6 May 2014 04:18:20 -0700 (PDT)\r
+Received: from wm1.irbs.net (wm1.irbs.net [216.86.168.168])\r
+ by smtp.mxes.net (Postfix) with ESMTP id 80AF1509B8;\r
+ Tue, 6 May 2014 07:18:19 -0400 (EDT)\r
+Received: from localhost (wm1.irbs.net [216.86.168.168])\r
+ by wm1.irbs.net (Postfix) with ESMTPA id 21EBE4FE398;\r
+ Tue, 6 May 2014 07:18:19 -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 12:18:19 +0100\r
+Message-ID: <20140506121819.644477lqzj4es7w8@webmail.tuffmail.net>\r
+Date: Tue, 06 May 2014 12:18:19 +0100\r
+From: 'Mash <subscribe@toshine.net>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: Notmuch-tree add/remove/toggle tag\r
+References: <20140506113931.75041t5v5q33pvr4@webmail.tuffmail.net>\r
+ <87oazbcggq.fsf@qmul.ac.uk>\r
+In-Reply-To: <87oazbcggq.fsf@qmul.ac.uk>\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
+Cc: notmuch@notmuchmail.org\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 11:18:24 -0000\r
+\r
+\r
+Quoting Mark Walters <markwalters1009@gmail.com>:\r
+\r
+> 'Mash <subscribe@toshine.net> writes:\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":\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
+)))\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"\r
+>> and "notmuch-show-get-tags" respectively in the "add a toggle\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
+> Hi\r
+>\r
+> I think you want\r
+>\r
+> (if (member "deleted" (notmuch-tree-get-tags))\r
+> (list "-deleted")\r
+> (list "+deleted")))))\r
+>\r
+> at the end. It looks like the wiki could do some tidying, which I will\r
+> try and have a look at at some point.\r
+>\r
+> Best wishes\r
+>\r
+> Mark\r
+\r
+Excellent!\r
+\r
+Many thanks for your quick response.\r
+\r
+I am attempting to move from > 8 years of using Mutt in an Emacs Term =20\r
+to Notmuch. Slow going so far, especially trying to get the workflow =20\r
+sorted. (The reason for the move is Mutt in Emacs24 Term is =20\r
+horrifically sluggish for some reason I am yet to discover.)\r
+\r
+I need to investigate a keybinding to go straight to notmuch-tree now.\r
+\r
+Thanks again,\r
+\r