From 1c5036a1388f59d2b3dbece8a2510a2db140d081 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Thu, 8 Mar 2012 17:49:03 +1900 Subject: [PATCH] [PATCH] Function to apply many tags in notmuch-search-mode --- 8a/5ad34aee4eb44b51e09712ab8c309bf76c495f | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 8a/5ad34aee4eb44b51e09712ab8c309bf76c495f diff --git a/8a/5ad34aee4eb44b51e09712ab8c309bf76c495f b/8a/5ad34aee4eb44b51e09712ab8c309bf76c495f new file mode 100644 index 000000000..3c2cb372a --- /dev/null +++ b/8a/5ad34aee4eb44b51e09712ab8c309bf76c495f @@ -0,0 +1,82 @@ +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 C54F7431FB6 + for ; Wed, 7 Mar 2012 14:49:05 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -5 +X-Spam-Level: +X-Spam-Status: No, score=-5 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_HI=-5] 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 F3GR9EVkZ-W5 for ; + Wed, 7 Mar 2012 14:49:05 -0800 (PST) +Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) + by olra.theworths.org (Postfix) with ESMTP id 3C7B7431FAE + for ; Wed, 7 Mar 2012 14:49:05 -0800 (PST) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com + (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) + by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q27Mn4J3026195 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) + for ; Wed, 7 Mar 2012 17:49:04 -0500 +Received: from localhost.localdomain ([10.3.113.2]) + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP + id q27Mn3hP027438 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) + for ; Wed, 7 Mar 2012 17:49:04 -0500 +From: Tim Bielawa +To: notmuch@notmuchmail.org +Subject: [PATCH] Function to apply many tags in notmuch-search-mode +Date: Wed, 7 Mar 2012 17:49:03 -0500 +Message-Id: <1331160543-22704-1-git-send-email-tbielawa@redhat.com> +In-Reply-To: <1331159950-21565-1-git-send-email-tbielawa@redhat.com> +References: <1331159950-21565-1-git-send-email-tbielawa@redhat.com> +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +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: Wed, 07 Mar 2012 22:49:05 -0000 + +Add a function for applying an arbitrary number of tags to the +highlighted message thread while in notmuch-search-mode. Intended to +restore the original functionality of notmuch-search-remove-tag and +notmuch-search-add-tag prior to 2beaefa2. +--- + emacs/notmuch.el | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index 99e0c93..b731c7c 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -663,6 +663,15 @@ added or removed for all threads in the region from BEG to END." + (interactive) + (notmuch-search-tag "-")) + ++(defun notmuch-search-tag-and-advance (&rest tags) ++ "Apply a tag or set of tags to the current thread. ++ ++Shortcut to simplify applying tags in search mode. Targeted for ++use in key-bound functions. Advances to the next thread after ++applying the tags." ++ (mapc 'notmuch-search-tag-thread tags) ++ (notmuch-search-next-thread)) ++ + (defun notmuch-search-archive-thread () + "Archive the currently selected thread (remove its \"inbox\" tag). + +-- +1.7.4.4 + -- 2.26.2