unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: Mark Walters <markwalters1009@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 00/11] Fix search tagging races
Date: Wed, 9 Oct 2013 12:19:08 -0400	[thread overview]
Message-ID: <20131009161907.GS21611@mit.edu> (raw)
In-Reply-To: <87ob70kxg1.fsf@qmul.ac.uk>

Quoth Mark Walters on Oct 08 at  8:56 am:
> 
> Hello
> 
> It's great that this might finally get done. But there is one problem
> currently.
> 
> If you open a large search buffer and then do *-<tab> it will die as the
> tagging routine runs notmuch search to find a completion-list for the
> tag. (it runs notmuch search --output=tags <query>)

Hmm.  If we implement docid queries (described in the TODO added by
this series), we should be able to get away with what we're doing now
without any serious performance problems...

> We could just return all tags in this case. Or we could do something
> like the series
> id:1354263691-19715-1-git-send-email-markwalters1009@gmail.com
> which makes completion happen based on the tags visible to the user, not
> the tags actually in the database.

OTOH, I think what you were going for in this series is the right
thing to do from a UI perspective anyway.  I'll try implementing
something along these lines, though I've got an idea that I think will
by more Elispy.  Currently `notmuch-tag' has this strange interface
where it can interactively prompt in some cases.  This isn't the right
way to do this.  `notmuch-tag' should be non-interactive and the
interactive tagging commands should have an interactive specification
that prompts for tags to change, right at the interactive entry point.
This should give us a clean place to provide a list of existing tags,
and would also let us do other nice things like specify a different
tag prompt for * commands, and maybe add a y/n prompt to confirm a *
tagging command.  It would also provide a convenient place to wait for
search results to finish coming in after prompting in the * command,
which would be awkward to do right now.

> There is also a little discussion of this in my earlier attempt at
> fixing this: eg id:87mwy4smad.fsf@qmul.ac.uk
> 
> Best wishes
> 
> Mark
> 
> On Mon, 07 Oct 2013, Austin Clements <amdragon@MIT.EDU> wrote:
> > I was hacking on undo support for notmuch-emacs and sort of
> > accidentally wrote this instead.  This series fixes a set of
> > well-known races where tagging from search-mode unexpectedly affects
> > messages that arrived after the search was performed (and hence the
> > user doesn't know they're tagging them).  We've attacked this a few
> > times before, but have always run up against something that was
> > missing.  It turns out the pieces are finally all in place.
> >
> > The first five patches just clean various things up in preparation.
> > Patches 6 and 7 add support for tagging large queries, which would
> > otherwise become a problem when later patches start using explicit
> > message ID-based queries for tagging.  The remaining four patches
> > actually fix the search tagging races using explicit message ID-based
> > queries.
> >
> > It's a fairly long series, but none of the patches are very big.
> >
> > _______________________________________________
> > notmuch mailing list
> > notmuch@notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2013-10-09 16:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 22:33 [PATCH 00/11] Fix search tagging races Austin Clements
2013-10-07 22:33 ` [PATCH 01/11] schemata: Disambiguate non-terminal names Austin Clements
2013-10-07 22:33 ` [PATCH 02/11] cli: Separate current and deprecated format version Austin Clements
2013-10-08  6:48   ` Mark Walters
2013-10-09 14:08     ` Austin Clements
2013-10-07 22:33 ` [PATCH 03/11] lib: Document extent of some return values Austin Clements
2013-10-07 22:33 ` [PATCH 04/11] test: Fix missing erase-buffer in emacs test Austin Clements
2013-10-07 22:33 ` [PATCH 05/11] emacs: Move `notmuch-call-notmuch-process' to notmuch-lib Austin Clements
2013-10-07 22:33 ` [PATCH 06/11] emacs: Support passing input via `notmuch-call-notmuch-*' Austin Clements
2013-10-07 22:33 ` [PATCH 07/11] emacs: Use notmuch tag --batch for large tag queries Austin Clements
2013-10-08  7:27   ` Mark Walters
2013-10-09 14:11     ` Austin Clements
2013-10-09  7:18   ` Jani Nikula
2013-10-09  7:38     ` Mark Walters
2013-10-09 14:14       ` Austin Clements
2013-10-07 22:33 ` [PATCH 08/11] search: Add stable queries to thread search results Austin Clements
2013-10-08 16:37   ` Mark Walters
2013-10-09  7:41   ` Jani Nikula
2013-10-09 14:36     ` Austin Clements
2013-10-09 18:25       ` Jani Nikula
2013-10-07 22:33 ` [PATCH 09/11] Add TODO about more efficient stable thread queries Austin Clements
2013-10-07 22:33 ` [PATCH 10/11] emacs: Add known-broken tests for search tagging races Austin Clements
2013-10-08 16:47   ` Mark Walters
2013-10-07 22:33 ` [PATCH 11/11] emacs: Fix " Austin Clements
2013-10-08  7:56 ` [PATCH 00/11] " Mark Walters
2013-10-09 16:19   ` Austin Clements [this message]
2013-10-09  7:43 ` Mark Walters
2013-10-09 16:11   ` Austin Clements

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=20131009161907.GS21611@mit.edu \
    --to=amdragon@mit.edu \
    --cc=markwalters1009@gmail.com \
    --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).