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 E056B414FAE for ; Sun, 8 Jan 2012 16:56:10 -0800 (PST) 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 pSzIKbGJkwB2 for ; Sun, 8 Jan 2012 16:56:10 -0800 (PST) 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 57C50415201 for ; Sun, 8 Jan 2012 16:56:10 -0800 (PST) Received: by iakk12 with SMTP id k12so6728193iak.26 for ; Sun, 08 Jan 2012 16:56:08 -0800 (PST) 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:content-transfer-encoding; bh=RtEDgHOMt+sC3Jdk8s/zhaWUP3UQ4dphOjhHkAWje+c=; b=rrYhCUf3SYZpOFjkZQM7tvUc/F/lKevs/t2nAwPGkcM59n34JOJBYcmCJqg9KzeLdM w/vCx+QvxgKDeZ73GrMgyXUVjsGlhWPQ9Gzx4f9/Aq96SimOtKqZn4nSmEKMQ1paoMHe hoq1UXBCeU/b4xZA/JhDvrjCnLw0vouOFI/rM= Received: by 10.50.219.234 with SMTP id pr10mr16627670igc.27.1326070568781; Sun, 08 Jan 2012 16:56:08 -0800 (PST) Received: from localhost (c-68-80-94-73.hsd1.pa.comcast.net. [68.80.94.73]) by mx.google.com with ESMTPS id gf6sm13008993igb.1.2012.01.08.16.56.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 Jan 2012 16:56:07 -0800 (PST) From: Aaron Ecay To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: call "notmuch tag" only once when archiving a thread In-Reply-To: <87fwftao1b.fsf@nikula.org> References: <1325615346-8302-1-git-send-email-jani@nikula.org> <87fwftao1b.fsf@nikula.org> User-Agent: Notmuch/0.10.1+56~gd709fd6 (http://notmuchmail.org) Emacs/24.0.92.3 (i386-apple-darwin10.8.0) Date: Sun, 08 Jan 2012 19:56:01 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 09 Jan 2012 00:56:11 -0000 On Thu, 05 Jan 2012 22:32:16 +0200, Jani Nikula wrote: [...] > In the show view it only modifies the messages that are currently > visible. This is to make sure you don't accidentally archive things that > have arrived after refreshing the buffer. I think this is safest. Hmm. Perhaps it would make sense to add a check in the search view that the thread being archived[1] has the same number of messages as it did when the buffer was constructed. (The information on how many messages the thread has is in the buffer; we would then compare this to the result of =E2=80=9Cnotmuch count thread:000foo=E2=80=9D when the user requests to = archive.) If the counts don=E2=80=99t match, the interface should show a message in the = echo area and (probably) refuse to do the tagging. We could also optionally use this strategy in the search view too. The error message is simple there: =E2=80=9CNew messages have arrived; refresh thread view before archiving.=E2=80=9D (It doesn=E2=80=99t make as much se= nse to tell people to refresh a search view =E2=80=93 it could be an expensive operation and/or may not be idempotent if some thread=E2=80=99s tags have been change= d. So it=E2=80=99s harder to say what the advice should be in that case.) If other people think it would be useful, I can work on a patch to implement this approach. Footnotes: [1] Or having its tags changed generally. --=20 Aaron Ecay