Re: search query "replytoid:<blah>"

Subject: Re: search query "replytoid:<blah>"

Date: Mon, 15 Jun 2015 00:30:57 +0200

To: notmuch

Cc:

From: Gregor Zattler


Hi Suvayu, notmuch users and developers,
* Suvayu Ali <fatkasuvayu+linux@gmail.com> [14. Jun. 2015]:
> Try the attached script.  It accepts notmuch queries by message id.
> E.g. to get the responses to your OP, you can do:
> 
>   $ ./nm-ack id:CAJhTkNhYew6H-bptACTew3gN3DLWg6agTYu8hAkdwFS=z4VFWg@mail.gmail.com
>   id:877fr79upd.fsf@maritornes.cs.unb.ca id:20150613205552.GC17381@chitra.no-ip.org
> 
> The first one is David's response, the second one is mine.

This is a nice script.  The very first Message(-Id:) I tried was
replied to by a message with this In-Reply-To: header:

        In-Reply-To: <7e093509.51e.14ddb300091.Coremail.chxp_moon@163.com> (windy’s
               message of „Wed, 10 Jun 2015 09:57:45 +0800 (CST)“)

Since the script extracts Message-Id:s from In-Reply-To; headers via

> function strip_mid() {
>     sed -e 's/[<> ]//g'
> }

the Message-Id:s did not match.  I therefore changed this to

function strip_mid() {
    egrep  -a -o "<[^[:space:]<>]+@[^@[:space:]<>]+>"|sed -e 's/[<> ]//g'
}

this did the trick.


Thanx, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

Thread: