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 81E1A429E32 for ; Thu, 5 Jan 2012 12:58:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 566X-1azUxHd for ; Thu, 5 Jan 2012 12:58:36 -0800 (PST) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C897B429E31 for ; Thu, 5 Jan 2012 12:58:35 -0800 (PST) Received: by eekd41 with SMTP id d41so778240eek.26 for ; Thu, 05 Jan 2012 12:58:34 -0800 (PST) Received: by 10.14.11.164 with SMTP id 36mr1244806eex.107.1325797114479; Thu, 05 Jan 2012 12:58:34 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id t1sm238417448eeb.3.2012.01.05.12.58.31 (version=SSLv3 cipher=OTHER); Thu, 05 Jan 2012 12:58:32 -0800 (PST) From: Jani Nikula To: Jameson Graef Rollins , Aaron Ecay , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: call "notmuch tag" only once when archiving a thread In-Reply-To: <87vcop3mx1.fsf@servo.finestructure.net> References: <1325615346-8302-1-git-send-email-jani@nikula.org> <87fwftao1b.fsf@nikula.org> <87vcop3mx1.fsf@servo.finestructure.net> User-Agent: Notmuch/0.10.2+182~g93862a2 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Thu, 05 Jan 2012 22:58:30 +0200 Message-ID: <87d3axamtl.fsf@nikula.org> 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: Thu, 05 Jan 2012 20:58:36 -0000 On Thu, 05 Jan 2012 12:38:18 -0800, Jameson Graef Rollins wrote: > On Thu, 05 Jan 2012 22:32:16 +0200, Jani Nikula wrote: > > In the search view it does exactly this. > > I worry about race conditions in this case, though. I frequently > archive threads after I've read everything, but I still want to know if > new message to that thread come in. If I attempt to archive a thread in > notmuch-search, but a new message has entered the thread without me > knowing it, I'll archive the new message before I had a chance to look > at it. Just to be clear: The patch in question does not alter this behaviour. The race you describe is there already. And at a glance, it does not look like something that would be trivial to fix. The buffer does not have the information to do that. BR, Jani.