Bug?: notmuch-search-show-thread shows several threads; only one containing matching messages

Pieter Praet pieter at praet.org
Thu Jan 26 05:32:14 PST 2012


On Thu, 26 Jan 2012 13:44:50 +0100, Gregor Zattler <telegraph at gmx.net> wrote:
> Hi Jamie, Austin,
> * Jameson Graef Rollins <jrollins at finestructure.net> [25. Jan. 2012]:
> > On Wed, 25 Jan 2012 20:19:03 -0500, Austin Clements <amdragon at MIT.EDU> wrote:
> >> One very common cause of this is someone using "reply" to get an
> >> initial set of recipients, but then replacing the entire message and
> >> subject (presumably without realizing that the mail is still tracking
> >> what it was a reply to).  This can also happen if someone
> >> intentionally replies to multiple messages (though few mail clients
> >> support this), or if there was a message ID collision.
> > 
> > This is a very common occurrence for me as well.  I would put money down
> > that this is what you're seeing.
> 
> I thought about this too and this is why I checked for any
> occurrence of Message-IDs in the other emails: 
> 
>    |> I isolated the thread I was interested in,
>    |> extracted the message ids of its messages and greped the rest of
>    |> the messages for this message ids: no matches.[2] Therefore no of
>    |> the rests messages are part of the thread I was interested in
> 
> perhaps there was a logic error in how I did this:
> 
>    |> [2] grep -I "^Message-Id:" /tmp/thread-I-m-interested-in.mbox |sed -e "s/Message-Id: <//I" -e "s/>$//" >really.mid
>    |>     grep -I -F really.mid rest.mbox
>    |>     --> no match
> 

Did you mean to do case-insensitive grep? ('-i' instead of '-I').

Also, the '-F' option expects input on stdin, not a filename.


Try this (with all individual threads split into separate mboxes):

  #+begin_src sh
    for i in $(ls *.mbox) ; do
        grep -i '^Message-Id:' "${i}" | \
            sed -e 's/^.\{13\}//' -e 's/>$//' \
            > "${i}.mids"
    done
    for i in $(ls *.mids) ; do
        echo "## Grepping for ${i}'s Message-Ids"
        grep -i -F "$(cat ${i})" *.mbox
    done
  #+end_src


Here's another couple of threads squashed into a single one:
- [O] [Use Question] Capture and long lines
  - id:"BANLkTikoF4tXuNLLufRzNSD6k2ZYs7sUcg at mail.gmail.com"
- [O] Worg update
  - id:"m1wrfiz3ch.fsf at tsdye.com"
- [O] Table formula to convert hex to dec
  - id:"20110724080054.GB16388 at x201"
- [O] ICS import?
  - id:"20120125173421.GQ3747 at x201"


AFAICT, none of them share Message-Id's...


> /tmp/thread-I-m-interested-in.mbox  is a mbox with messages
> I'minterested in, the "real" ones.  really.mid is a list of
> Message-IDs of these "real" emails.  rest.mbox is a mbox with the
> other emails, Emacs showed in his notmuch show buffer but are
> other threads.
> 
> Since there is no match I concluded, the threads are not linked.
> Perhaps I made a mistake.  I'l retest it and report again.  But
> right now I don't have the time to do this.
> 
> Ciao, Gregor
> -- 
>  -... --- .-. . -.. ..--.. ...-.-
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Peace

-- 
Pieter


More information about the notmuch mailing list