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 ED8116DE0BB9 for ; Sun, 18 Sep 2016 02:08:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.366 X-Spam-Level: X-Spam-Status: No, score=-0.366 tagged_above=-999 required=5 tests=[AWL=0.204, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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 vQFOYl0-CBpJ for ; Sun, 18 Sep 2016 02:08:22 -0700 (PDT) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by arlo.cworth.org (Postfix) with ESMTPS id DF5E26DE0BB6 for ; Sun, 18 Sep 2016 02:08:21 -0700 (PDT) Received: by mail-wm0-f41.google.com with SMTP id b130so14579369wmc.0 for ; Sun, 18 Sep 2016 02:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=GG6JomTlrT4LaBHcS7/Cr20ZzGxxiQEnh/2tkigIbog=; b=VtyD75ksBZ+1g5wdE/xgrk225mJ00pj7mb7bc5y1CiwW3yk3KGZxa8+8bFFPyjdfdM nGP1dePMhUzK+uAbFnyj7STRTIvnFOS7LVwjp2n21uf1tLaSQPx4oaiTuQSPTOr1GTzk zZddqMoHmLRKYw+XcsdJh05og/fvK92yCfKpWqF53SSACSiPn2xdGj62wZytxriKHJPH +dKgYW1qa4FVuFd5zcBHnlyZrkZJwiKe4FvVKBYLmE21htyfuRvla14yXePG1Gip4MmZ wyLLnCb1tO8l1NFPN9nQZL7sGieJwXwDfMTP6OJCT09Y663T7yEwKb4ycZlGjNAcmuny +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 :user-agent:date:message-id:mime-version; bh=GG6JomTlrT4LaBHcS7/Cr20ZzGxxiQEnh/2tkigIbog=; b=N1fbXl1ggFCbf2x8cD9PPTYacLbunAp4+61FMOyCOiCxVQAOd1KmG61kMEpMSgMGjk qzlJ0WJkW24AveKHnjyGYHj5KJCUy7gHUDqpaFwhmK4o8JrACrTD2rkRrzdi/BiEBR70 tqqaDsx1DEwbe9g5qqmeL4CbEl+Zi6JjuMnm9e14FTK3C02Nmrj8z3YL7e6ZUAX6tC0X +2kST55ljVaQq8gs3ATVnwF+iFteuHYmKYaz7N7jWjuG5e2Mmiqz6yYLWHJYtrXmZUPw 8KF38xArR/Hsuowx5cgovN6yrr8yM6en2OGo/plytMyImItnQH0ZRPdvuMY5B9OKn9PQ DhOA== X-Gm-Message-State: AE9vXwNSLjDHbdHij2Vi5tpVOtBJQovGPTNH7YOjDsfU8vNc+ullEkzdek2qe2kuuWlGwg== X-Received: by 10.28.126.81 with SMTP id z78mr5108333wmc.13.1474189700195; Sun, 18 Sep 2016 02:08:20 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id p71sm15965773wmf.9.2016.09.18.02.08.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Sep 2016 02:08:19 -0700 (PDT) From: Mark Walters To: Ioan-Adrian Ratiu , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add tag jump menu In-Reply-To: <87h99dg0af.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> References: <1474146583-28476-1-git-send-email-markwalters1009@gmail.com> <87h99dg0af.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Notmuch/0.18.1+485~gca076ce (https://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Sun, 18 Sep 2016 10:08:18 +0100 Message-ID: <8737kxbmnx.fsf@qmul.ac.uk> 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 09:08:23 -0000 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. 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) 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. >