[PATCH v2 5/6] emacs: add support for reversing notmuch-search-archive-thread tag...
authorJani Nikula <jani@nikula.org>
Thu, 6 Sep 2012 15:32:41 +0000 (18:32 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:25 +0000 (09:49 -0800)
1b/fae6beb872f9788660919acf48e100c56f4046 [new file with mode: 0644]

diff --git a/1b/fae6beb872f9788660919acf48e100c56f4046 b/1b/fae6beb872f9788660919acf48e100c56f4046
new file mode 100644 (file)
index 0000000..ea8988e
--- /dev/null
@@ -0,0 +1,107 @@
+Return-Path: <jani@nikula.org>\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 5DC6C431FDA\r
+       for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:33:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 hh8rjf1snqOU for <notmuch@notmuchmail.org>;\r
+       Thu,  6 Sep 2012 08:33:02 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 40E8A431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:33:02 -0700 (PDT)\r
+Received: by mail-lpp01m010-f53.google.com with SMTP id c1so1301010lah.26\r
+       for <notmuch@notmuchmail.org>; Thu, 06 Sep 2012 08:33:01 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:x-gm-message-state;\r
+       bh=fMeP6o5DuzHohZZWfgud7xAXNPMntgwOaeHEqyJeHMs=;\r
+       b=kttOkviFIxmShYJzl6US50U0SrCIFBLaf5TGA225M6/cSh6RNMCz1BSFcTTq4+WmL1\r
+       i8w/iAIHPVUaMloyoPZnO0+JfvNZqdOSQb5lq+LKVCvjSHh+iyLEkrOhGl3dS9M6jg6j\r
+       bHcJ7idj1dTYm54nYRWS5bAob1wG++3kPJJQ4guanLyJ0e/4c3SkD8MR1l5CwJ+Ehkhn\r
+       dJxgtD2kkmsd1xWZihSBjtqLqwX9i2OzpDj0sxMoSnhWPRCa9C4WmNQmYMnCDlcIXN8w\r
+       xMfmea0Pg8USPsj8dp91We91QPoEjuQ8oHB4z477d89tdd1rC8zw+UTJrqkRq/dTCjyE\r
+       wVbQ==\r
+Received: by 10.152.104.44 with SMTP id gb12mr2318776lab.29.1346945581824;\r
+       Thu, 06 Sep 2012 08:33:01 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id bc2sm678488lbb.3.2012.09.06.08.33.00\r
+       (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2012 08:33:01 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 5/6] emacs: add support for reversing\r
+       notmuch-search-archive-thread tag changes\r
+Date: Thu,  6 Sep 2012 18:32:41 +0300\r
+Message-Id:\r
+ <b825f80c9267cd3f5492ea9b2a23f0cbdbdc8712.1346945257.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <cover.1346945257.git.jani@nikula.org>\r
+References: <cover.1346945257.git.jani@nikula.org>\r
+In-Reply-To: <cover.1346945257.git.jani@nikula.org>\r
+References: <cover.1346945257.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQk89wy1gQ2BZO81Io8fZs9vpcAxwr+x63PK7aknH9YEN7zPM8pVlFh6pPFcmaEqV+QQJLUo\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\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: Thu, 06 Sep 2012 15:33:03 -0000\r
+\r
+Since archiving a thread can now be a user customized set of tag\r
+changes, make reversing this easier. Allow a prefix argument to\r
+notmuch-search-archive-thread to reverse the archiving, similar to the\r
+unarchiving in notmuch-show-archive-message.\r
+---\r
+ emacs/notmuch.el |    6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 64caa3e..a8a85ce 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -593,7 +593,7 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."\r
+   (interactive)\r
+   (notmuch-search-tag "-"))\r
+ \r
+-(defun notmuch-search-archive-thread ()\r
++(defun notmuch-search-archive-thread (&optional unarchive)\r
+   "Archive the currently selected thread.\r
+ \r
+ Archive each message in the currently selected thread by applying\r
+@@ -603,10 +603,10 @@ messages will be \"unarchived\" (i.e. the tag changes in\r
+ `notmuch-archive-tags' will be reversed).\r
+ \r
+ This function advances the next thread when finished."\r
+-  (interactive)\r
++  (interactive "P")\r
+   (when notmuch-archive-tags\r
+     (notmuch-search-tag\r
+-     (notmuch-tag-change-list notmuch-archive-tags)))\r
++     (notmuch-tag-change-list notmuch-archive-tags unarchive)))\r
+   (notmuch-search-next-thread))\r
+ \r
+ (defun notmuch-search-update-result (result &optional pos)\r
+-- \r
+1.7.9.5\r
+\r