--- /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 3D46940C440\r
+ for <notmuch@notmuchmail.org>; Fri, 6 Jun 2014 05:48:48 -0700 (PDT)\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 FKx6-95WRNh0 for <notmuch@notmuchmail.org>;\r
+ Fri, 6 Jun 2014 05:48:42 -0700 (PDT)\r
+Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com\r
+ [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 8CB0940B02F\r
+ for <notmuch@notmuchmail.org>; Fri, 6 Jun 2014 05:48:42 -0700 (PDT)\r
+Received: by mail-wi0-f172.google.com with SMTP id ho1so899657wib.17\r
+ for <notmuch@notmuchmail.org>; Fri, 06 Jun 2014 05:48:41 -0700 (PDT)\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:in-reply-to:references;\r
+ bh=Xe135Vs+qkvsQ2gbcGnfrGNdnPnqZmHOQtVcDJs5ZuU=;\r
+ b=nrP3uGw4HpIKvVl4uKLsR7k0i7OcNFbXdttO+2ByiuMmKhjL+IT2bP46cYM5ZnrJ4c\r
+ C8999BLuqcozlaU8nzTR9+cGPfWv+DxXkxpYlWdOUn+tPY7auzzfJoNk7OltNclcAJgG\r
+ W/ax1XwATIQZCY7rFqmZS/9DGTbkbl4aTt5pMLey5SmQSsFJkIlQOevCrB3KInwrOIlP\r
+ a9VejKJ2RlHAtV79Nh1+Ss4hkpIJVZMqx8Pj/sDaNyHBNK8gcASuiagEXn1Wgs+nIOcC\r
+ oLKWMQCMAJmSWUc7z93k639UlMcbaEr524RxbTKV/xHxp3YFUwVImpcRTxwn/SfjcKYu\r
+ jztw==\r
+X-Received: by 10.194.92.148 with SMTP id cm20mr5130588wjb.53.1402058921155;\r
+ Fri, 06 Jun 2014 05:48:41 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by mx.google.com with ESMTPSA id l2sm21221872wix.13.2014.06.06.05.48.40\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Fri, 06 Jun 2014 05:48:40 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: search archive tweak\r
+Date: Fri, 6 Jun 2014 13:48:33 +0100\r
+Message-Id: <1402058914-16070-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <87bnv92521.fsf@inf-8660.int-evry.fr>\r
+References: <87bnv92521.fsf@inf-8660.int-evry.fr>\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, 06 Jun 2014 12:48:48 -0000\r
+\r
+notmuch-search-archive-thread moves to the next line after tagging. In\r
+the normal case this makes sense, but if the region is active, it tags\r
+the whole region and then it doesn't really. Thus only move to the\r
+next line if region is not active.\r
+---\r
+\r
+In response to the request in the parent message.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+ emacs/notmuch.el | 3 ++-\r
+ 1 file changed, 2 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index f6bf9c8..2a9876f 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -580,7 +580,8 @@ (defun notmuch-search-archive-thread (&optional unarchive beg end)\r
+ (when notmuch-archive-tags\r
+ (notmuch-search-tag\r
+ (notmuch-tag-change-list notmuch-archive-tags unarchive) beg end))\r
+- (notmuch-search-next-thread))\r
++ (when (eq beg end)\r
++ (notmuch-search-next-thread)))\r
+ \r
+ (defun notmuch-search-update-result (result &optional pos)\r
+ "Replace the result object of the thread at POS (or point) by\r
+-- \r
+1.7.10.4\r
+\r