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 2B9F96DE0B78 for ; Sun, 18 Sep 2016 06:31:36 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 yyeFthD1f4dl for ; Sun, 18 Sep 2016 06:31:35 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 7146C6DE00DB for ; Sun, 18 Sep 2016 06:31:35 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1blcBo-000840-9N; Sun, 18 Sep 2016 09:31:24 -0400 Received: (nullmailer pid 5883 invoked by uid 1000); Sun, 18 Sep 2016 13:31:31 -0000 From: David Bremner To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add tag jump menu In-Reply-To: <1474146583-28476-1-git-send-email-markwalters1009@gmail.com> References: <1474146583-28476-1-git-send-email-markwalters1009@gmail.com> Date: Sun, 18 Sep 2016 10:31:31 -0300 Message-ID: <87zin5tjv0.fsf@zancas.localnet> 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 13:31:36 -0000 Mark Walters writes: > 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. > > To customize you want the variable notmuch-tagging-keys in the group > notmuch-tag. It is only very lightly tested but seems to work. And the > docstrings will definitely need some work. 1) I was playing with moving my notmuch patch review workflow to this setup, and I discovered that most of my tagging combos don't undo very well. Basically that's because the represent transitions from multiple states into a single one, e.g. ("p" ("+pending" "+notmuch::patch" "-notmuch::needs-review" "-notmuch::moreinfo" "-notmuch::pushed")) So if use "k p" then it's unlikely that the message had all three tags with "-". To be clear, my current setup doesn't allow undo at all, so I'm not losing anything. If we think about the operation as reverse rather than undo, it might be nice to have non-reversable operations that are ignored when doing the reverse, e.g. ("p" ("+pending" "=notmuch::patch" "#notmuch::needs-review" "#notmuch::moreinfo" "#notmuch::pushed")) meaning unreversed, add pending and notmuch::patch and delete notmuch::(needs-review, moreinfo, pushed) while reversed only deletes pending. A simpler implimentation would have two lists of operations, one that is ignored on reverse. I'm not sure if people will buy into this idea of non-reversible operations, and it could be a future enhancement (although changing the customize structure is a mild hassle). In any case this distinction between undo and reverse is worth keeping in mind when working on the docs. 2) Would it be hard/possible to define submaps ? I have 9 tagging commands related to notmuch maintence, and it seems like it would be nicer to have those as e.g. "k n p" rather than clutter up the top level "k " map. This could also be a future enhancement