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 76DBB429E25 for ; Tue, 28 Jun 2011 10:36:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 uFf1OmHQMJf8 for ; Tue, 28 Jun 2011 10:36:20 -0700 (PDT) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D33C2431FD0 for ; Tue, 28 Jun 2011 10:36:19 -0700 (PDT) Received: by iyf40 with SMTP id 40so368333iyf.26 for ; Tue, 28 Jun 2011 10:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=Ec5CzQ8fh+7l0aeQdGf+jnpKA9uSf+hyHt/RD9JrhIc=; b=IuemsjHna+2AsRMpFKx7CnKh5Dxmgqz6TAkhf5jV9gAP68N8nvzO1RNT+DAylOQPw0 5pTG0Xw2VPS23JO6/np/laX/lVkOTozpexQc12EYpT4Jmkd/7A268InqMtlzIsheKnwj VLh9xMRLMeqnF6h44kctLakgaJN4Ev0XFFqFg= Received: by 10.42.195.207 with SMTP id ed15mr9707330icb.61.1309282578448; Tue, 28 Jun 2011 10:36:18 -0700 (PDT) Received: from localhost ([74.205.145.146]) by mx.google.com with ESMTPS id d8sm291955icy.21.2011.06.28.10.36.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Jun 2011 10:36:14 -0700 (PDT) From: Mark Anderson To: Pieter Praet , Robin Green , notmuch@notmuchmail.org Subject: Re: Race condition for '*' command In-Reply-To: <87fwmuxxgd.fsf@praet.org> References: <86d3i1d06r.fsf@dragonfly.greenrd.org> <87sjqx31mp.fsf@servo.factory.finestructure.net> <86aad5c6h2.fsf@dragonfly.greenrd.org> <87fwmuxxgd.fsf@praet.org> User-Agent: Notmuch/0.5-283-gb744eac (http://notmuchmail.org) Emacs/23.2.1 (i686-pc-linux-gnu) Date: Tue, 28 Jun 2011 11:36:10 -0600 Message-ID: <87tyb9j1th.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Tue, 28 Jun 2011 17:36:20 -0000 On Tue, 28 Jun 2011 08:49:06 +0200, Pieter Praet wrote: > On Sun, 26 Jun 2011 10:00:41 +0100, Robin Green wrote: > > On Sat, 25 Jun 2011 16:57:50 -0700, Jameson Graef Rollins wrote: > > > On Sat, 25 Jun 2011 23:18:52 +0100, Robin Green 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). I don't think there's a better way, the results which the user is viewing is the only visual reference for what the action they intend to apply will use as the object of said action. I can imagine some people wanting to have a way to apply an action to a live query string, but I distinguish between these people and normal humans reading their email. I expect that when a normal human is reading their email, they do not intend to apply actions to messages as yet unseen. I can see some people using the '*' notmuch emacs command as a very interactive notmuch-poll.sh script. But I imagine the principle of least surprise would be to have '*' only apply to visible messages, and if the buffer is old, the buffer is the only record of what is being viewed. -Mark > > > -- > > Robin > > _______________________________________________ > > notmuch mailing list > > notmuch@notmuchmail.org > > http://notmuchmail.org/mailman/listinfo/notmuch > > Peace > > -- > Pieter > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch