unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Ico Doornekamp <notmuch@zevv.nl>, notmuch@notmuchmail.org
Subject: Re: Break thread relationship
Date: Fri, 12 Feb 2021 07:47:11 -0400	[thread overview]
Message-ID: <87ft21wls0.fsf@tethera.net> (raw)
In-Reply-To: <161311698022.226668.13732125578400863626@mdoos>

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Ico Doornekamp <notmuch@zevv.nl> writes:

>
> I tried to remove the "References" and "In-Reply-To" headers of the
> offending mail, and reindex the thread. This seems not enough to
> convince notmuch that these mails are no longer related, because the
> original and separated thread still end up with the same thread ID.
>

I would expect that to work in general.

One possibility is there are duplicate files for the message.

I'm reminded that I meant to distribute the attached script somewhere
(either in notmuch or in mailscripts). Perhaps you can run it before and
after your edits.


[-- Attachment #2: draw-thread --]
[-- Type: application/octet-stream, Size: 912 bytes --]

#!/bin/bash

# This script can be used like
# NOTMUCH_CONFIG=test/tmp.T580-thread-search/notmuch-config \
#    devel/draw-thread thread:0000000000000002 | dot -Tpdf > thread2.pdf

# In addition to notmuch, you will need the following tools installed
# - graphviz
# - formail (part of procmail)

threadid=$1

declare -a edges

declare -a dest
echo "digraph \"$threadid\" {"
for messageid in $(notmuch search --output=messages $threadid); do
    echo "subgraph \"cluster_$messageid\" {"
    printf "\"%s\" [shape=folder];\n" ${messageid#id:}
    for file in $(notmuch search --output=files $messageid); do
        node=$(basename $file)
        printf "\"%s\" [shape=note];\n" $node

        mapfile -t dest < <(formail -x references < $file | tr '<>,' '"" ')
        edge="\"$node\" -> { ${dest[*]} }"
        edges+=($edge)
    done
    echo "}"
done

for edge in "${edges[*]}"; do
    echo $edge
done

echo "}"

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



      reply	other threads:[~2021-02-12 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  8:03 Break thread relationship Ico Doornekamp
2021-02-12 11:47 ` David Bremner [this message]

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=87ft21wls0.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=notmuch@zevv.nl \
    /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).