From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 49678431FD2 for ; Wed, 25 Jan 2012 02:49:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 U+4Ev2QMwUXj for ; Wed, 25 Jan 2012 02:49:56 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6B702431FBC for ; Wed, 25 Jan 2012 02:49:56 -0800 (PST) Received: by werb10 with SMTP id b10so4289272wer.26 for ; Wed, 25 Jan 2012 02:49:55 -0800 (PST) Received: by 10.216.145.1 with SMTP id o1mr2638334wej.45.1327488595188; Wed, 25 Jan 2012 02:49:55 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id fv6sm110524wib.8.2012.01.25.02.49.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jan 2012 02:49:54 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 328999FE67; Wed, 25 Jan 2012 10:49:52 +0000 (GMT) To: Jameson Graef Rollins , Notmuch Mail Subject: Re: [PATCH v3 3/8] emacs: break out thread navigation from notmuch-show-archive-thread In-Reply-To: <1327449983-23638-4-git-send-email-jrollins@finestructure.net> References: <87pqea24z0.fsf@servo.finestructure.net> <1327449983-23638-1-git-send-email-jrollins@finestructure.net> <1327449983-23638-2-git-send-email-jrollins@finestructure.net> <1327449983-23638-3-git-send-email-jrollins@finestructure.net> <1327449983-23638-4-git-send-email-jrollins@finestructure.net> User-Agent: Notmuch/0.11+109~g03934e4 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Wed, 25 Jan 2012 10:49:51 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Gm-Message-State: ALoCoQmr6gCvez7A1bkjendUC4DlPlDAAult7tA7gPl8sexkLa114Sm0wShJk+sC9IVIAYo/RhB/ 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, 25 Jan 2012 10:49:57 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 24 Jan 2012 16:06:18 -0800, Jameson Graef Rollins wrote: > This function is now just for archiving the current thread. A new > function is created to archive-then-next. The 'a' key binding is > updated accordingly. >=20 > This will allow people to bind to the simple thread archiving function > without the extra navigation. The archive-thread function now also > takes a prefix to unarchive the current thread (ie. put the whole > thread back in the inbox). > --- > emacs/notmuch-show.el | 23 +++++++++++++++++------ > 1 files changed, 17 insertions(+), 6 deletions(-) >=20 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index fb908b0..071e662 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -1044,7 +1044,7 @@ thread id. If a prefix is given, crypto processing= is toggled." > (define-key map "-" 'notmuch-show-remove-tag) > (define-key map "+" 'notmuch-show-add-tag) > (define-key map "x" 'notmuch-show-archive-thread-then-exit) > - (define-key map "a" 'notmuch-show-archive-thread) > + (define-key map "a" 'notmuch-show-archive-thread-then-next) > (define-key map "N" 'notmuch-show-next-message) > (define-key map "P" 'notmuch-show-previous-message) > (define-key map "n" 'notmuch-show-next-open-message) > @@ -1304,7 +1304,7 @@ thread from the search from which this thread was o= riginally > shown." > (interactive) > (if (notmuch-show-advance) > - (notmuch-show-archive-thread))) > + (notmuch-show-archive-thread-then-next))) >=20=20 > (defun notmuch-show-rewind () > "Backup through the thread, (reverse scrolling compared to \\[notmuch-= show-advance-and-archive]). > @@ -1558,8 +1558,12 @@ added." > (if show-next > (notmuch-search-show-thread))))) >=20=20 > -(defun notmuch-show-archive-thread () > - "Archive each message in thread, then show next thread from search. > +(defun notmuch-show-archive-thread (&optional unarchive) > + "Archive each message in thread. > + > +If a prefix argument is given, the messages will be > +\"unarchived\" (ie. the \"inbox\" tag will be added instead of > +removed). It's clearer to reference "inbox" directly: Remove the "inbox" tag from the messages currently shown. If a prefix argument is given the "inbox" tag will be added rather than removed. >=20=20 > Archive each message currently shown by removing the \"inbox\" > tag from each. Then kill this buffer and show the next thread > @@ -1569,14 +1573,21 @@ Note: This command is safe from any race conditio= n of new messages > being delivered to the same thread. It does not archive the > entire thread, but only the messages shown in the current > buffer." > + (interactive "P") > + (if unarchive > + (notmuch-show-add-tag-thread "inbox") > + (notmuch-show-remove-tag-thread "inbox"))) > + > +(defun notmuch-show-archive-thread-then-next () > + "Archive each message in thread, then show next thread from search." > (interactive) > - (notmuch-show-remove-tag-thread "inbox") > + (notmuch-show-archive-thread) > (notmuch-show-next-thread t)) >=20=20 > (defun notmuch-show-archive-thread-then-exit () > "Archive each message in thread, then exit back to search results." > (interactive) > - (notmuch-show-remove-tag-thread "inbox") > + (notmuch-show-archive-thread) > (notmuch-show-next-thread)) >=20=20 > (defun notmuch-show-stash-cc () > --=20 > 1.7.8.3 >=20 > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8f3lAACgkQaezQq/BJZRbD1wCfcdD81P8xLIrF2gqw4Uq+EelX 7mkAnjdAGxwAay+YR6OtKxg4qfkhBpLo =XKXo -----END PGP SIGNATURE----- --=-=-=--