From 8d5976375c45586b0b8ea5c1d11899d4e56235c9 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 26 May 2014 00:34:40 +0100 Subject: [PATCH] Re: Cannot apply multiple tags to a selection in search view --- 89/9eafab12deee5d09a65a27550742345e9f739c | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 89/9eafab12deee5d09a65a27550742345e9f739c diff --git a/89/9eafab12deee5d09a65a27550742345e9f739c b/89/9eafab12deee5d09a65a27550742345e9f739c new file mode 100644 index 000000000..55f5f06e2 --- /dev/null +++ b/89/9eafab12deee5d09a65a27550742345e9f739c @@ -0,0 +1,111 @@ +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 1DAE5431FBD + for ; Sun, 25 May 2014 16:35:15 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.502 +X-Spam-Level: +X-Spam-Status: No, score=0.502 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, 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 9WzJ9XOlEZoX for ; + Sun, 25 May 2014 16:35:11 -0700 (PDT) +Received: from mail1.qmul.ac.uk (mail1.qmul.ac.uk [138.37.6.7]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 64C26431FAF + for ; Sun, 25 May 2014 16:35:11 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail1.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WohwC-00044Y-FT; Mon, 26 May 2014 00:35:07 +0100 +Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WohwC-0008IS-2m; Mon, 26 May 2014 00:34:44 +0100 +From: Mark Walters +To: mailinglists@nawaz.org, notmuch@notmuchmail.org +Subject: Re: Cannot apply multiple tags to a selection in search view +In-Reply-To: <87d2f1jxof.fsf@nawaz.org> +References: <87d2f1jxof.fsf@nawaz.org> +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 26 May 2014 00:34:40 +0100 +Message-ID: <87k3995t67.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 87.81.223.162 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 2fa7c6619bdb29854e0bb909a1f55da0 (of first 20000 bytes) +X-SpamAssassin-Score: -0.1 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -0.1 points. + Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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: Sun, 25 May 2014 23:35:15 -0000 + + +Hi + +I think notmuch-search-tag (and other tagging functions) were cleaned up +for 0.17: in particular their interactive behaviour +changed. notmuch-search-tag now only looks at the region if called +interactively. I think the following would do what you want + +(define-key notmuch-search-mode-map "d" + (lambda (beg end) "Delete message." + (interactive (notmuch-search-interactive-region)) + (notmuch-search-tag '("+delete" "-inbox" "-lowpriority" "-@review" "-@respond" "-unread") beg end))) + +Best wishes + +Mark + +On Sun, 25 May 2014, mailinglists@nawaz.org wrote: +> Hi, +> +> After upgrading to version 0.17, the following function that used to +> work fine in the past misbehaves when I select multiple messages: +> +> (define-key notmuch-search-mode-map "d" +> (lambda () +> "Delete message." (interactive) (notmuch-search-tag +> '("+delete" "-inbox" "-lowpriority" "-@review" "-@respond" +> "-unread")))) +> +> If I press "d", it only applies the tags to the message my cursor is +> on - not my whole message. +> +> If I manually execute the notmuch-search-tag command, it does work on +> the whole selection, though. +> +> Any ideas? +> +> Thanks! _______________________________________________ notmuch +> mailing list notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2