From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 71D776DE00DF for ; Sat, 26 Aug 2017 03:23:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=5 tests=[AWL=-0.052, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jwi-Fu4h9wkw for ; Sat, 26 Aug 2017 03:23:41 -0700 (PDT) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id 4430B6DE00D4 for ; Sat, 26 Aug 2017 03:23:41 -0700 (PDT) Received: by mail-wm0-f67.google.com with SMTP id e67so2125357wmd.0 for ; Sat, 26 Aug 2017 03:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=6pta+MdeWOLROGb0G04o8TnLZjOKDRn1VuNd+RtFeMM=; b=je7XiikNmBcGksTbV5AGMI4bPJaQU0wP7tCL8cy28GmdTKIoBqS+ezyDAF9Ynm6cWC ataQZbGc+AC1ssMu4nSA0HAs27UNt2jKlafBTn25ttAdSCxY64A7ZWZke31Yzjs0QMWe /oVhGeuTiH+r7hMH1LBnjhK5ObBqCIBRRBP9wYHtxE1FBE4Vq2owxVa2mfN74snsGpHk C/4fb5oaHF2GGn7Dzdk+HpAyZ34VnFH4I17kXcX+c9GZ/nujz6X47fLvmBBV4qGCZERn mfbnhjMBtKRuPX49FrbPlg36NEeeeAbjJBZRMNnXfab8boKUnfUd4itXCm7S8Xap2KS0 6DHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=6pta+MdeWOLROGb0G04o8TnLZjOKDRn1VuNd+RtFeMM=; b=FnjnXSICm1dWormT9l+9G9rZPaodK/yZVTCj29UZMRSefBcKly7sXZvNkShwMd7plb WKYLXfSohdYm1yU0YQo4k6ghsgnXqbNSfB28cOFwaAZzJTDbtMrZGulXHHfzsaa/U6cy j1Y+Otl4IEdW/g3K1HjoY87yUiA9XE83MWhTffrhwS4nCWAHQzC8I5Uw253IoDscaPgx 5ijukAgS60fAmyXakN7JFA96W9iuDxPVvjDC3AQjlyY10ybcoL7TwbHbSwEbJPvbImBo LHvcGp4UJbs0c9vQ487F5+5y3pyk4VUObSLmWjddL9ecOjo8VDvxq79/qnN3/vcXKu1o wz1w== X-Gm-Message-State: AHYfb5irFoE++Bf3OGAaolhna38vZqOo75zp8IMuVtIVLdRwrlrlw9SP 70dp6rjnJLPg9Q== X-Received: by 10.28.60.69 with SMTP id j66mr604352wma.29.1503743017352; Sat, 26 Aug 2017 03:23:37 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id p9sm4965450wra.25.2017.08.26.03.23.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Aug 2017 03:23:36 -0700 (PDT) From: Mark Walters To: Vladimir Panteleev , notmuch@notmuchmail.org Cc: Vladimir Panteleev Subject: Re: [PATCH v2] emacs: Add notmuch-update-search-tags In-Reply-To: <20170826015541.25937-1-notmuch@thecybershadow.net> References: <41a586b8-5059-7190-3ae6-ab6017795c28@gmail.com> <20170826015541.25937-1-notmuch@thecybershadow.net> Date: Sat, 26 Aug 2017 11:23:35 +0100 Message-ID: <87a82mzkyg.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 26 Aug 2017 10:23:42 -0000 Hi On Sat, 26 Aug 2017, Vladimir Panteleev wrote: > From: Vladimir Panteleev > > Implement an option which, when enabled, causes any tag changes done > from within notmuch-emacs to instantly update matching threads in open > search buffers. I like the idea, and provided it only marks the tags as changed in the normal way, I think we could even default to on. However, I am concerned that this version does other things as well. Note these comments are from reading the patch not from testing, so please point out if I am wrong. 1) Suppose a new message arrives in the thread. Then triggering a tag change in the show buffer, (eg notmuch automatically removing an unread tag) pulls that message into original search buffer. 2) If that new message has some tags that aren't in the thread they will get marked as "added tags" 3) At least in theory I think the thread may no longer exist -- it could have merged with another thread and taken the other threads id. I think 3 is probably rare enough not to be real concern (though we should make sure we don't actually give an error). But 1 and 2 seem undesirable. Rather than refreshing the result it might make sense to fetch the tags for the actual messages in that thread (as it was when the search buffer was loaded) by using notmuch-search-find-stable-query. So something like the following, - in each notmuch-search buffer - see if thread-id thread is in that buffer (or perhaps even if there is a thread which contains message id in that buffer?) - If yes, fetch a new list of tags for the messages that buffer thinks are in that thread (using notmuch-search-find-stable-query). - Update tags appropriately. If we do that then I think the only change in these buffers is the tag updates, and exactly as if you changed those tags in the search buffer itself, the threads shown etc don't change. What do you think? Best wishes Mark