From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iGyeOn6J8WEpCgAAgWs5BA (envelope-from ) for ; Wed, 26 Jan 2022 18:48:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +PlJN36J8WGVgwAAauVa8A (envelope-from ) for ; Wed, 26 Jan 2022 18:48:46 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B5C071910D for ; Wed, 26 Jan 2022 18:48:46 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D696B5F721; Wed, 26 Jan 2022 17:48:43 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6E3015F719 for ; Wed, 26 Jan 2022 17:48:41 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id D115F5FBD2; Wed, 26 Jan 2022 12:48:40 -0500 (EST) Received: (nullmailer pid 1110665 invoked by uid 1000); Wed, 26 Jan 2022 17:48:39 -0000 From: David Bremner To: Carl Worth , inwit Subject: Re: [PATCH] emacs: add global tag history In-Reply-To: <878rv2foky.fsf@wondoo.home.cworth.org> References: <20220126153214.1366353-1-inwit@sindominio.net> <87v8y6a4k2.fsf@tethera.net> <950e8c5ec7ca93f9d21c9c0855971511@sindominio.net> <878rv2foky.fsf@wondoo.home.cworth.org> Date: Wed, 26 Jan 2022 13:48:39 -0400 Message-ID: <87sfta9ymg.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: K64ONSN54XFVCZDP3WYJ2QW336EUKX3D X-Message-ID-Hash: K64ONSN54XFVCZDP3WYJ2QW336EUKX3D X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: notmuch@notmuchmail.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643219326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=8mt1Ymk0fOi95RZpFXDFH4J4q8oVSYZIdHTfsK7lFEg=; b=hdxuxYYhLVLhrKYtp5OdVIkLLdaZV6zFW0bsnWx316ugftUhXYDgNB3ZqfXhffskhLubd8 SSgwdwfqhn6EIvwGjugT0o4n4eMDaiUphW+6dk4Fry2dtkKDz1OQu8pMCHtvXEx6l+3JZC kQTgVHKf67yX1+Fgq5OUkBA1i3TVl1kfhx5pfSfQndQf3HnGiXc9Tk07Ap33iLZj/gXOQ8 hPyp9Paq1TPTZfYPA/uMVIoV3mrM/Y4ZPIQhoj9gtD2JVkaQ3w7fmsDN6mgBlclzIWIaqH aKMx+8xuBi0oHWa+BtpjW1NrDIwo3Ye9FhfkF7wCzlJ8DOOIHOyIro99CAhhpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643219326; a=rsa-sha256; cv=none; b=W88rrwsC7GR0gM7gv5ddjmi/n9IG1vj0VlcsIsZMXZY4QNj/Ejia9aico5Zsomt5SzzqfN bnFXbRWP4tAeVjj7fPZUYQuFL1Jho+UWsK7AntFbWJLQa39YkZFjacpPx723tQl9Pv8I/e ilDuVLAjrJ0XRKdpClSHXtRdA4oAjwDDMal0sTTPgKl7b78iZOtabuiuHP+2OXWrC+v3AU /QiobsQJw4rMzLr/jBT8AXej0oaDAaVPTxBk5kiujXr/vsNAPAnqHeGg89lGDbc52+M6sT SrGxy1OR/xmdJFl4z3sJ+6rtjZ1TLTYMp9L/bVWw0jiE0k6YVs+VZnwTKa39kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -3.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: B5C071910D X-Spam-Score: -3.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: BK8SCsXXU2S5 Carl Worth writes: > On Wed, Jan 26 2022, inwit wrote: >>> Even that will not be perfect (since the messages matching the query >>> could change behind emacs back), but close enough for most interactive >>> use, maybe? >> >> I was thinking about saving the IDs of the messages affected by the >> change, but I still don't know how would I go about that or if it's >> sensible. > > One could imagine a history that would enable a conventional undo stack > for a notmuch interface. The trick with making that usable would be the > need to refresh views to make what was undone evident, (and the fact > that some of the operations could be large/slow). > > All of those issues kept me from pursuing the idea in early days of > coding up the emacs notmuch UI. But someone could certainly explore the > implementation further if desired. One thing that has changed since those early days is that we now have lastmod (see notmuch-search-terms(7)): queries, but that is still not atomic. I guess it might not be too hard to have notmuch tag output output the correct lastmod value. Then we could store that as shorthand for a set of messages. d