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