unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Jameson Rollins <jrollins@finestructure.net>,
	Dirk Hohndel <hohndel@infradead.org>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] remove message archiving from show-advance-and-archive
Date: Wed, 09 Jun 2010 12:33:21 -0700	[thread overview]
Message-ID: <87vd9sgfwe.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <87sk4wvwqy.fsf@servo.finestructure.net>

[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]

On Wed, 09 Jun 2010 15:20:21 -0400, Jameson Rollins <jrollins@finestructure.net> wrote:
> On Wed, 09 Jun 2010 11:20:47 -0700, Dirk Hohndel <hohndel@infradead.org> wrote:
> > On Wed, 09 Jun 2010 10:50:15 -0700, Carl Worth <cworth@cworth.org> wrote:
> > 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:
> 
> (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.)

-Carl

-- 
carl.d.worth@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2010-06-09 19:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 14:49 [PATCH] remove message archiving from show-advance-and-archive Jameson Rollins
2010-06-09 15:12 ` David Edmondson
2010-06-09 15:25   ` Jameson Rollins
2010-06-09 15:36     ` David Edmondson
2010-06-09 15:55       ` Jameson Rollins
2010-06-09 17:18         ` David Edmondson
2010-06-09 17:29           ` Jameson Rollins
2010-06-09 17:47             ` David Edmondson
2010-06-09 17:54         ` Carl Worth
2010-06-09 19:07           ` servilio
2010-06-09 19:11           ` Jameson Rollins
2010-06-09 17:50 ` Carl Worth
2010-06-09 18:20   ` Dirk Hohndel
2010-06-09 19:12     ` servilio
2010-06-09 19:20     ` Jameson Rollins
2010-06-09 19:33       ` Carl Worth [this message]
2010-06-15  9:25     ` Sebastian Spaeth
2010-06-09 19:04   ` servilio
2010-06-09 19:18   ` Jameson Rollins
2010-06-09 19:55   ` Michal Sojka
2010-06-15  9:21   ` Sebastian Spaeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vd9sgfwe.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=hohndel@infradead.org \
    --cc=jrollins@finestructure.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).