unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Pieter Praet <pieter@praet.org>
To: Robin Green <greenrd@greenrd.org>, notmuch@notmuchmail.org
Subject: Re: Race condition for '*' command
Date: Tue, 28 Jun 2011 08:49:06 +0200	[thread overview]
Message-ID: <87fwmuxxgd.fsf@praet.org> (raw)
In-Reply-To: <86aad5c6h2.fsf@dragonfly.greenrd.org>

On Sun, 26 Jun 2011 10:00:41 +0100, Robin Green <greenrd@greenrd.org> wrote:
> On Sat, 25 Jun 2011 16:57:50 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> > On Sat, 25 Jun 2011 23:18:52 +0100, Robin Green <greenrd@greenrd.org> wrote:
> > > A race condition in the '*' command was noted when it was first
> > > proposed. It looks to me like it still exists - has anything been done
> > > about it?
> > 
> > Hi, Robin.  Can you explain what you mean by the "'*' command"?
> 
> Sorry - forgot to say I'm talking about the notmuch emacs mode. In that
> mode '*' applies tags to all messages matching the current search query,
> which means that (here's the race condition) new results that have
> appeared since the last refresh will also be tagged.

This issue appears to stem from the fact that `notmuch-search-operate-all'
runs (apply 'notmuch-tag notmuch-search-query-string action-split), in which
`notmuch-search-query-string' points to a moving target.

Could be solved by doing it with `notmuch-search', `mark-whole-buffer'
and `notmuch-search-{add,remove}-tag-region' instead, but I'm sure
there's a better way (of which I'm as of yet unaware).

> -- 
> Robin
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Peace

-- 
Pieter

  reply	other threads:[~2011-06-28  6:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-25 22:18 Race condition for '*' command Robin Green
2011-06-25 23:57 ` Jameson Graef Rollins
2011-06-26  9:00   ` Robin Green
2011-06-28  6:49     ` Pieter Praet [this message]
2011-06-28 17:36       ` Mark Anderson
2011-06-28 19:48         ` Carl Worth
2011-06-30 16:08           ` [PATCH 1/2] test: add/remove tags from all matching messages with `notmuch-search-operate-all' Pieter Praet
2011-06-30 16:08             ` [PATCH 2/2] [RFC] possible solution for "Race condition for '*' command" Pieter Praet
2011-06-30 19:38               ` Pieter Praet
2011-07-01 14:55                 ` 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=87fwmuxxgd.fsf@praet.org \
    --to=pieter@praet.org \
    --cc=greenrd@greenrd.org \
    --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).