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 6D620431FC0 for ; Sun, 2 Sep 2012 12:58:26 -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 NNvUhySy3U5J for ; Sun, 2 Sep 2012 12:58:25 -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 659F2431FB6 for ; Sun, 2 Sep 2012 12:58:25 -0700 (PDT) Received: by mail-lpp01m010-f53.google.com with SMTP id c1so3430631lah.26 for ; Sun, 02 Sep 2012 12:58:25 -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=LJAYdnBk8uZiBViDOVzARVw+l/ikO6p0kFGnCmKpLobXD+CXWTpi8ca/FV0nWtcWph eD3XoGyqF2tudeADpgu2ZOJIC3Rlx56WixMkMQJTqjXuxfUI0+Dq6OGY5WpcqFxcIqs2 J+cOPSJKvlNy276N98CV5kwKi3L9tb2w/jHp8Dybs2dJ836W9DTr/SQRVTZPMyns3qAK 39U3LZwRZaGVBTUQJJpi/hiXb56v+20TnTkdQCIczTZgbQzOLz+R972C+S/pEgV/2wp+ y8aFkQXkWpZIIcSbzSk/ljH2xGzXWQnm9amRb4rw2w9OJHw0JPXW6JEtThJ9o5bADGko y/wA== Received: by 10.112.99.37 with SMTP id en5mr4766578lbb.25.1346615905047; Sun, 02 Sep 2012 12:58:25 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id lv13sm11363282lab.8.2012.09.02.12.58.23 (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 12:58:24 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 5/6] emacs: add support for reversing notmuch-search-archive-thread tag changes Date: Sun, 2 Sep 2012 22:58:04 +0300 Message-Id: <018b1a8f2d1df62e804ce88b65401304832dfbbf.1346614915.git.jani@nikula.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQn1LtjEiE4c9HOCdvm5t6B2cOJPg45+x+pIVMv4JIppcoFZhVxdGKNZa8HM8u6nP9T2ah9G 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: Sun, 02 Sep 2012 19:58:26 -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