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 B80514196F3 for ; Wed, 9 Jun 2010 12:33:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.89 X-Spam-Level: X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham 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 VZFv8-NsT-qF; Wed, 9 Jun 2010 12:33:22 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0E882431FC1; Wed, 9 Jun 2010 12:33:22 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id AFB51568E39; Wed, 9 Jun 2010 12:33:21 -0700 (PDT) From: Carl Worth To: Jameson Rollins , Dirk Hohndel , Notmuch Mail Subject: Re: [PATCH] remove message archiving from show-advance-and-archive In-Reply-To: <87sk4wvwqy.fsf@servo.finestructure.net> References: <87zkz4xnf4.fsf@servo.finestructure.net> <871vcghz8o.fsf@yoom.home.cworth.org> <87sk4wvwqy.fsf@servo.finestructure.net> User-Agent: Notmuch/0.3.1-61-ge870437 (http://notmuchmail.org) Emacs/23.1.1 (i486-pc-linux-gnu) Date: Wed, 09 Jun 2010 12:33:21 -0700 Message-ID: <87vd9sgfwe.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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, 09 Jun 2010 19:33:32 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 09 Jun 2010 15:20:21 -0400, Jameson Rollins wrote: > On Wed, 09 Jun 2010 11:20:47 -0700, Dirk Hohndel = wrote: > > On Wed, 09 Jun 2010 10:50:15 -0700, Carl Worth wrot= e: > > I really like this. It's consistent and I'm sure I'll get used to it > > quickly. The only question now is "all messages in a thread" or "all > > open messages in a thread". I'd vote for all. I have situations in which I want either one. The advantage of doing "all open messages" is that it's easy to get the "all messages" behavior by way of an existing command that's already useful in its own right, ("open all messages"). And I think "all open messages" is actually the right default as well. If I do a focused search and end up reading one message that matched the search, then archiving away that message and not others that just happen to be in the same thread. > I actually vote for the behavior Carl suggests. The behavior of > archiving the entire thread can be done by popping out to the search and > applying notmuch-search-archive-thread to the thread with: >=20 > (define-key notmuch-search-mode-map "a" 'notmuch-search-archive-thread) Or not. ;-) I actually want to also fix the search mode commands like this to only operate on messages that matched the (original search). We had behavior that limited these commands to matching messages once, but that was broken because it re-ran the search to find the list. So that led to behavior like: -inbox # archive all messages in the thread Then if the user realized that was a mistake, trying: +inbox # new search now matches nothing, so no effect Our stop-gap solution here was to re-run a search with fewer restrictions if the first search returned an empty list. The correct solution is to remember the list of messages that matched the first time and always operate on those. That will fix the above problem and also avoid the race condition that can currently happen if notmuch new is being run asynchronously from emacs. (The race is that the user can thing he's archiving a thread with a single message but can actually archive many messages that arrived since the original search because the 'a' command is re-running the search.) =2DCarl =2D-=20 carl.d.worth@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFMD+yB6JDdNq8qSWgRAikuAJ94Gcoaq3yY9s8tum5Ttw464VK1YQCfWihF VD9p0k7pD/LoEJnVn83QctY= =Rjpu -----END PGP SIGNATURE----- --=-=-=--