From: 'Mash Date: Tue, 6 May 2014 11:18:19 +0000 (+0100) Subject: Re: Notmuch-tree add/remove/toggle tag X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=65341eb6887e03ddd50b9f41a35d0f0d335dcce9;p=notmuch-archives.git Re: Notmuch-tree add/remove/toggle tag --- diff --git a/d6/327bb7daf1043d9a8844f5b6666dc7135cf671 b/d6/327bb7daf1043d9a8844f5b6666dc7135cf671 new file mode 100644 index 000000000..94fb4bb18 --- /dev/null +++ b/d6/327bb7daf1043d9a8844f5b6666dc7135cf671 @@ -0,0 +1,128 @@ +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 1ADB3431FDC + for ; Tue, 6 May 2014 04:18:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7] + 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 KiY5BfhH8VCT for ; + Tue, 6 May 2014 04:18:20 -0700 (PDT) +Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 15349431FD6 + for ; Tue, 6 May 2014 04:18:20 -0700 (PDT) +Received: from wm1.irbs.net (wm1.irbs.net [216.86.168.168]) + by smtp.mxes.net (Postfix) with ESMTP id 80AF1509B8; + Tue, 6 May 2014 07:18:19 -0400 (EDT) +Received: from localhost (wm1.irbs.net [216.86.168.168]) + by wm1.irbs.net (Postfix) with ESMTPA id 21EBE4FE398; + Tue, 6 May 2014 07:18:19 -0400 (EDT) +Received: from lon.namesco.net (lon.namesco.net [195.7.254.102]) by + webmail.tuffmail.net (Horde Framework) with HTTP; + Tue, 06 May 2014 12:18:19 +0100 +Message-ID: <20140506121819.644477lqzj4es7w8@webmail.tuffmail.net> +Date: Tue, 06 May 2014 12:18:19 +0100 +From: 'Mash +To: Mark Walters +Subject: Re: Notmuch-tree add/remove/toggle tag +References: <20140506113931.75041t5v5q33pvr4@webmail.tuffmail.net> + <87oazbcggq.fsf@qmul.ac.uk> +In-Reply-To: <87oazbcggq.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; + charset=ISO-8859-1; + DelSp="Yes"; + format="flowed" +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable +User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.0) +Cc: notmuch@notmuchmail.org +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, 06 May 2014 11:18:24 -0000 + + +Quoting Mark Walters : + +> 'Mash writes: +> +>> I am trying to setup a tag toggle to be used in the Notmuch-tree. +>> +>> I referred to "Add a key binding to add/remove/toggle a tag": +>> http://notmuchmail.org/emacstips/#index8h2 +>> +>> Looking at "notmuch-tree.el" I noticed +>> +>> (defun notmuch-tree-get-tags () +>> "Return the tags of the current message." +>> (notmuch-tree-get-prop :tags)) +>> +>> and +>> +>> (defun notmuch-tree-tag (tag-changes) +>> "Change tags for the current message" +>> (interactive +>> (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message"= +))) +>> (notmuch-tag (notmuch-tree-get-message-id) tag-changes) +>> (notmuch-tree-tag-update-display tag-changes)) +>> +>> Which in my mind would be substituted for "notmuch-show-tag-message" +>> and "notmuch-show-get-tags" respectively in the "add a toggle +>> "deleted" key" example. +>> +>> (define-key notmuch-tree-mode-map "d" +>> (lambda () +>> "toggle deleted tag for message" +>> (interactive) +>> (notmuch-tree-tag +>> (if (member "deleted" (notmuch-tree-get-tags)) +>> "-deleted" "+deleted")))) +> +> Hi +> +> I think you want +> +> (if (member "deleted" (notmuch-tree-get-tags)) +> (list "-deleted") +> (list "+deleted"))))) +> +> at the end. It looks like the wiki could do some tidying, which I will +> try and have a look at at some point. +> +> Best wishes +> +> Mark + +Excellent! + +Many thanks for your quick response. + +I am attempting to move from > 8 years of using Mutt in an Emacs Term =20 +to Notmuch. Slow going so far, especially trying to get the workflow =20 +sorted. (The reason for the move is Mutt in Emacs24 Term is =20 +horrifically sluggish for some reason I am yet to discover.) + +I need to investigate a keybinding to go straight to notmuch-tree now. + +Thanks again, +