From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: David Bremner <david@tethera.net>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: thread merge/split proposal
Date: Mon, 11 Apr 2016 18:41:21 -0400 [thread overview]
Message-ID: <87egabu5ta.fsf@alice.fifthhorseman.net> (raw)
In-Reply-To: <878u0l8uyv.fsf@zancas.localnet>
[-- Attachment #1: Type: text/plain, Size: 2807 bytes --]
On Sun 2016-04-10 09:16:40 -0400, David Bremner wrote:
> Daniel Kahn Gillmor <dkg@fifthhorseman.net> 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" <<EOF
From: test@example.org
Date: $(date -R)
Message-Id: <$(uuidgen)@join.example.org>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 948 bytes --]
next prev parent reply other threads:[~2016-04-11 22:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 17:14 thread merge/split proposal Daniel Kahn Gillmor
2016-04-04 18:23 ` Daniel Kahn Gillmor
2016-04-10 13:16 ` David Bremner
2016-04-11 22:41 ` Daniel Kahn Gillmor [this message]
2016-04-12 0:56 ` David Bremner
2016-04-12 1:29 ` Daniel Kahn Gillmor
2016-08-06 23:50 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egabu5ta.fsf@alice.fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).