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 29A22431FD9 for ; Fri, 30 Nov 2012 00:23:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, 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 v9XKpzbd1sNo for ; Fri, 30 Nov 2012 00:23:43 -0800 (PST) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2B294429E29 for ; Fri, 30 Nov 2012 00:23:26 -0800 (PST) Received: by mail-wi0-f169.google.com with SMTP id hq12so6189689wib.2 for ; Fri, 30 Nov 2012 00:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=jLpymd7H5ciP4UVLLlbim3a2VEEI+DVjLVnu0hRrbt0=; b=F5Axkc1sgT81OlKmzIY3hEjZYD0royvWce41JbJk/HKwZC/tfYllwp8rI7ghmu3Qg1 lt8ohH1b2QWwGNql6gFDSZyvfR2N3rb+ZSOfjdHC3Yv/+B533ReOHziXlOT8w10BG92H imnoXzdoidoYx4JkYiXr7Ofz3fQu9Rz9+ytuuFldwzR0yG++RUxX5MtrfO5fNMBIjbea z8wOs6KwtcSOw+7uwjcGZH4cEnS2D16SG2Mo/HVLm9EXjTEH1vZ4f5UgRHLbG41m2J5D Nu7M0Fe0eJQYOQnzE2PQfq5wayxonwLy3w5B5VMzqL4qN8gOPY/c8gGb6NiTgXKR+7cb HvWg== Received: by 10.216.218.151 with SMTP id k23mr131417wep.193.1354263804931; Fri, 30 Nov 2012 00:23:24 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPS id w5sm5935534wiz.10.2012.11.30.00.23.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Nov 2012 00:23:24 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH 4/5] emacs: make search tag completion use the tags it believes are there Date: Fri, 30 Nov 2012 08:21:30 +0000 Message-Id: <1354263691-19715-5-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1354263691-19715-1-git-send-email-markwalters1009@gmail.com> References: <1354263691-19715-1-git-send-email-markwalters1009@gmail.com> 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: Fri, 30 Nov 2012 08:23:44 -0000 From: markwalters1009 Tagging from search mode now passes the tags it believes are present to the completion function. This means that the user interface is more consistent: tag-completion will complete to any tag the user can see (even if it is no longer present). --- emacs/notmuch.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 4e6bbcf..4ffa803 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -567,8 +567,9 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (defun notmuch-search-tag-region (beg end &optional tag-changes) "Change tags for threads in the given region." - (let ((search-string (notmuch-search-find-thread-id-region-search beg end))) - (setq tag-changes (funcall 'notmuch-tag search-string tag-changes)) + (let ((search-string (notmuch-search-find-thread-id-region-search beg end)) + (current-tags (notmuch-search-get-tags-region beg end))) + (setq tag-changes (funcall 'notmuch-tag search-string tag-changes current-tags)) (notmuch-search-foreach-result beg end (lambda (pos) (notmuch-search-set-tags -- 1.7.9.1