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