From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A4CCE6DE0C69 for ; Sun, 18 Sep 2016 07:30:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.672 X-Spam-Level: X-Spam-Status: No, score=-0.672 tagged_above=-999 required=5 tests=[AWL=0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ah_tqcSSQxEg for ; Sun, 18 Sep 2016 07:30:34 -0700 (PDT) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by arlo.cworth.org (Postfix) with ESMTPS id 4C7006DE0C51 for ; Sun, 18 Sep 2016 07:30:34 -0700 (PDT) Received: by mail-wm0-f45.google.com with SMTP id w84so36367891wmg.1 for ; Sun, 18 Sep 2016 07:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adirat-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=j/vT6lYAI6rzXYoMoJ46NB9GsaPM/wOFhws0U6MJajA=; b=MtI68mQ2Y17vv4O/RM62Qq65QLn7krZtJfFFbnusF2vhGAYrBj1OwY9MZLlCQKrkNx Us5OdzeK3SpX8ze+1EhC2pgDMAFtCzDQBEOl6eDSEhZdKBTUVeovmV8zFQmvuuBIpnRZ aayD5XJrev703cH9kBksHOqvXSIJ6Xztx2Ke9j//pbPCLzHNdecL3CAU17+yCX4HKHnv C3f6K3EPMXpdl4GfRguYt9VkBLE+l1mwhltcdPN05ds0GW4yQeEpp8G19Lpi7b5RrpJe RGpkCpKQCE/bdBjICpXdkV9nA09iUCG3NbKdOdk6JaRCt1VHNL4y87n3g0oGXNb4i+Xr y//A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=j/vT6lYAI6rzXYoMoJ46NB9GsaPM/wOFhws0U6MJajA=; b=i7/6O2b3adVy/N6qwQLJwye81nwE4O+RcdcIzdS7uROJJ7dwFTLV+fkxvcKOGUt7qK wUBBjFMs4PJdYJPBcXtWv0qSjHnAjSuQiZ9+bVP9JtBg8f4xJe7vfCrov9RwIAZgk78t RwyD6M63hpP2/S2/i8q9QIvaDM5Hudux64veKMg65HHHbr6xfB62cE01+R6zGTIqbatf 9so76IhhXKXlfMOAocXP5m7nEXtWtgq47Ki4hP3zBTLXwfcm8WTluj9vb5ICECTTSn0+ B5FZ0gATYGA/NeVQr0uwfkq0bBOTJcaeeNpUn8oDB4rX3KMrVY9Ft5coM7KSxMqb4Dnl aN2Q== X-Gm-Message-State: AE9vXwM1WBs6IZBidYQlTxxd2HlNtQISGTLW/d4l3Ac5vDW2EaDxnN5uNQNUTdLU0WfoqQ== X-Received: by 10.194.9.36 with SMTP id w4mr20993014wja.133.1474209032204; Sun, 18 Sep 2016 07:30:32 -0700 (PDT) Received: from adiPC ([188.24.78.211]) by smtp.gmail.com with ESMTPSA id e12sm17127823wmg.17.2016.09.18.07.30.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Sep 2016 07:30:31 -0700 (PDT) From: Ioan-Adrian Ratiu To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add tag jump menu In-Reply-To: <8737kxbmnx.fsf@qmul.ac.uk> References: <1474146583-28476-1-git-send-email-markwalters1009@gmail.com> <87h99dg0af.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> <8737kxbmnx.fsf@qmul.ac.uk> Date: Sun, 18 Sep 2016 17:30:29 +0300 Message-ID: <87poo19t6i.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sun, 18 Sep 2016 14:30:36 -0000 On Sun, 18 Sep 2016, Mark Walters wrote: > On Sun, 18 Sep 2016, Ioan-Adrian Ratiu wrote: >> Hi >> >> I have implemented something similar in my tree and I really like the >> idea. I have one issue though. >> >> On Sat, 17 Sep 2016, Mark Walters wrote: >>> Add a "jump" style menu for doing tagging operations. >>> --- >>> >>> Jani suggested something like this on irc today. This is a first cut >>> to see if people like it. By default the tagging jump menu is bound to >>> k (which works in search/show/tree mode), and has the following options >>> >>> a (Archive) -inbox -unread >>> u (Mark Read) -unread >>> d (Delete) +deleted >>> >>> If you do ctrl-u k the it will do the reverse operation. >> >> I know C-u is default emacs behaviour but I find very cumbersone to do >> C-u for unapplying the tag. What I do and want is to simply apply the >> tag when pressing "d" then unapply it when pressing "d" again if the >> mail/thread already contains the deleted tag (basically it's a toggle). > > I agree that C-u is a little cumbersome -- I think I would be happy for > a toggle for single messages (with a single tag change), but for > multiple messages like a thread I think it would be very unclear what it > was doing. My workflow with the kind of code shown above is as follows: If in notmuch-search then pressing 'd' "deletes" everything selected, including multiple messages in a region and if a thread was selected in that region then the entire thread is deleted. If I want to delete just a single message from the thread, I go to notmuch-show where 'd' operates on a single message, never on a thread. If an entire thread was already marked "deleted" and I want to undelete a single message from that thread, I go to notmuch-show and press 'd' on it. IMO this is the simplest and the clearest workflow. > > In your example I think d on a thread with a deleted message would > undelete the thread, rather than deleting the other messages in the > thread. But whichever of the two we chose I could see people being > unsure which it was going to do. > > It would be plausible to modify my patch so that k u does the same as > Ctrl-u k (i.e. takes you to the reverse tag operations) which would > avoid the awkward ctrl-u. (I don't want to add another key to the top > level maps as we are really very short on free keys) I agree to not pollute the top level maps and 'k u' would work for me, what is important for me is to support toggling :) > > Best wishes > > Mark > > > > >> Here's an example of code I'm using: >> >> (define-key notmuch-show-mode-map "d" >> (lambda () >> "toggle deleted tag for message" >> (interactive) >> (if (member "deleted" (notmuch-show-get-tags)) >> (notmuch-show-tag (list "-deleted")) >> (notmuch-show-tag (list "+deleted"))))) >> >> (define-key notmuch-search-mode-map "d" >> (lambda (&optional beg end) >> "toggle deleted tag for message" >> (interactive (notmuch-search-interactive-region)) >> (if (member "deleted" (notmuch-search-get-tags)) >> (notmuch-search-tag (list "-deleted") beg end) >> (notmuch-search-tag (list "+deleted") beg end)))) >> >> It works really well for me :). "inbox" and other tags work similarly. >>