From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id AD565429E2B for ; Sun, 3 Jul 2011 23:53:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 bqE13AQQ0Q3E for ; Sun, 3 Jul 2011 23:53:11 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1F359431FD0 for ; Sun, 3 Jul 2011 23:53:10 -0700 (PDT) Received: by mail-wy0-f181.google.com with SMTP id 22so3733696wyh.26 for ; Sun, 03 Jul 2011 23:53:10 -0700 (PDT) Received: by 10.216.68.2 with SMTP id k2mr4294185wed.0.1309762390792; Sun, 03 Jul 2011 23:53:10 -0700 (PDT) Received: from localhost ([109.131.160.67]) by mx.google.com with ESMTPS id ei4sm4224028wbb.60.2011.07.03.23.53.09 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 23:53:10 -0700 (PDT) From: Pieter Praet To: Austin Clements Subject: [PATCH 5/5] emacs: make `notmuch-search-operate-all' use matched-msgids instead of the original query string Date: Mon, 4 Jul 2011 08:51:58 +0200 Message-Id: <1309762318-4530-6-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309762318-4530-1-git-send-email-pieter@praet.org> References: <20110703171743.GL15901@mit.edu> <1309762318-4530-1-git-send-email-pieter@praet.org> Cc: Notmuch Mail 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: Mon, 04 Jul 2011 06:53:11 -0000 Signed-off-by: Pieter Praet --- emacs/notmuch.el | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 46e276a..0d040a2 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -869,7 +869,10 @@ Each character of the tag name may consist of alphanumeric characters as well as `_.+-'. " (interactive "sOperation (+add -drop): notmuch tag ") - (let ((action-split (split-string action " +"))) + (let ((action-split (split-string action " +")) + (msgids (mapconcat 'identity + (notmuch-search-find-matched-msgids-region (point-min) (- (point-max) 2)) + " or "))) ;; Perform some validation (let ((words action-split)) (when (null words) (error "No operation given")) @@ -877,7 +880,7 @@ characters as well as `_.+-'. (unless (string-match-p "^[-+][-+_.[:word:]]+$" (car words)) (error "Action must be of the form `+thistag -that_tag'")) (setq words (cdr words)))) - (apply 'notmuch-tag notmuch-search-query-string action-split))) + (apply 'notmuch-tag msgids action-split))) (defun notmuch-search-buffer-title (query) "Returns the title for a buffer with notmuch search results." -- 1.7.5.4