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