From fe822529fb0136f772b61bcdd46431b896f5b986 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Tue, 12 Apr 2016 18:41:21 +2000 Subject: [PATCH] Re: thread merge/split proposal --- 9a/023bb451cff3f9d714ff5198daea45e07ba4f3 | 169 ++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 9a/023bb451cff3f9d714ff5198daea45e07ba4f3 diff --git a/9a/023bb451cff3f9d714ff5198daea45e07ba4f3 b/9a/023bb451cff3f9d714ff5198daea45e07ba4f3 new file mode 100644 index 000000000..cbb8721fa --- /dev/null +++ b/9a/023bb451cff3f9d714ff5198daea45e07ba4f3 @@ -0,0 +1,169 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id CA5266DE00E1 + for ; Mon, 11 Apr 2016 15:41:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.02 +X-Spam-Level: +X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.020] + 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 ZC2-Sq2unO6R for ; + Mon, 11 Apr 2016 15:41:27 -0700 (PDT) +Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) + by arlo.cworth.org (Postfix) with ESMTP id 4D8846DE00BB + for ; Mon, 11 Apr 2016 15:41:27 -0700 (PDT) +Received: from fifthhorseman.net (unknown [38.109.115.130]) + by che.mayfirst.org (Postfix) with ESMTPSA id 2DC80F991; + Mon, 11 Apr 2016 18:41:25 -0400 (EDT) +Received: by fifthhorseman.net (Postfix, from userid 1000) + id BB74E1FFD1; Mon, 11 Apr 2016 18:41:24 -0400 (EDT) +From: Daniel Kahn Gillmor +To: David Bremner , Notmuch Mail +Subject: Re: thread merge/split proposal +In-Reply-To: <878u0l8uyv.fsf@zancas.localnet> +References: <87mvp9uwi4.fsf@alice.fifthhorseman.net> + <87k2kdutao.fsf@alice.fifthhorseman.net> <878u0l8uyv.fsf@zancas.localnet> +User-Agent: Notmuch/0.21+124~gbf604e9 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Mon, 11 Apr 2016 18:41:21 -0400 +Message-ID: <87egabu5ta.fsf@alice.fifthhorseman.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha512; protocol="application/pgp-signature" +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 11 Apr 2016 22:41:35 -0000 + +--=-=-= +Content-Type: text/plain + +On Sun 2016-04-10 09:16:40 -0400, David Bremner wrote: +> Daniel Kahn Gillmor writes: +> +>> for (1) i'd propose that the join operation would be implemented by +>> adding a new term type "join", which can be applied to any document. +>> Its value is the message-id of a message that *should* be "in-reply-to" +>> but wasn't. +> +> Having "split" terms or equivalently "signed" +-reference terms would +> allow more general thread splitting, effectively updating (via a little +> journal of additions and deletions) the references data stored in mail +> file. + +I'm not sure what you mean by "signed" here (cryptographically signed? +a term named "signed"? the idea that the term could be either positive +or negative?), but i think your proposal is that we could have a +"reference" term with a value of "+foo@example.com" or +"-foo@example.com", instead of having a "join" term with value +"foo@example.com" and a "split" term with value "foo@example.com" + +I'm not sure i see much of a difference between + + a) introduce two new term types, "join" and "split", with unsigned + values + +and + + b) introduce one new term type, "reference" with signed values + +> The implementation cost could not be that much higher than only +> join/unjoin; a bit more work managing the terms attached to a document +> to avoid contradictions. + +right -- and we'd need an understanding of the order in which these +terms are applied if multiple possibly-conflicting terms are present. + +> Both versions probably complicate some peoples syncing solutions. + +both (a) and (b) complicate syncing solutions, but my original proposal +of: + + c) just introduce a new term type "join" with unsigned value + +is easy to sync, i think; i was going for the low-hanging fruit, and +trying to not let it get caught up on the more-fully-featured +arbitrary-split use case, though i understand the appeal of the generic +approach. + +fwiw, i can do a really nasty workaround today to implement "join" +between two messages: + +#### notmuch-join: +-------------- +#!/bin/bash + +verify_exists() { + if ! notmuch search --output=files id:"$1" | grep -q . ; then + printf "message-id %s is not in your messages\n" "$1" >&2 + exit 1 + fi +} + +verify_exists "$1" +verify_exists "$2" + +jdir=$(notmuch config get database.path)/join +mkdir -p "$jdir" +z=$(mktemp "$jdir/join.XXXXXX") + +cat >"$z" < +References: <$1>, <$2> +Subject: join + +test +EOF +notmuch new +rm "$z" +notmuch new +-------------- + +And i note that this change is also not synced across dump/restore. + +So adding an explicit "join" document term (and figuring out how to +represent it in "notmuch dump" and "notmuch restore") would be a strict +improvement over the current situation, right? + + --dkg + + +--=-=-= +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQJ8BAEBCgBmBQJXDCgRXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy +NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcK8RoQAI82FInuseffZAQKXaHgU5Gm +sRq9qytGeqRp0/AQybpYgol5B9JEcB1LoAwpU3ka3CUy6mt4adeABpwnGLgG2bhR +oXcD4aT+uiczA9L1E4mipWBAAD0cVfd69zvcU+yF116Gc2FNzE+eNZJ4M+UAEdGc +o4Vl8wQVCCxcU9COrtvRSGY5+Z6kc5w/iKH7jOmLCCZsREVT4RXwks7jqUziep17 +TJDZB62X0f1ZYvcPGrPEvgvlTfdyi+Pt/WvOPrMen6Q6HDAnzhfsruftCANonvyw +ROnXHXt7C0Co6AKcB7y33sACk6+8cMreUh2x9ty8Ih9epp580LVg0NudcYwB4pHa +C0Zc233ou9z9hMT02jO+C6fxb37yqQJXb4IMfj3Xk8lXstH09Xt1+1jD6Dmo701e +iSLn+DCNymvw+gziJy/lzyuMO2EVdvVjW0Qw0EejOwPIxcTcQJuU5PaR7CxFkZyS +XQ8KgZ6kvgyvlaOV3PF51dwhYVF64eZ/LGuysB3IsQZ0DTOrdMF/o0cAumosaUmb +OOMJ/3xLa6lCN+mUIvn0HQOu+8SBPodbvb2oWmVbC9zqjpd0yJ4FAKd6xBcVQPm4 +gMSwPvTW1ATUofDUM1KkGp8HKSbuacxDVZZdD+cOG7PVrsTsy+ubkXWarMIr0xhf +hK+B8KNhQgbrUNrN1rBo +=Gkgo +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2