From: Xu Wang Date: Sun, 13 Sep 2015 15:10:05 +0000 (+2000) Subject: Re: Possible some threads are not complete due to bug? X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3986a47ad8a4a3ff8e9073fcaaea28dd78346e78;p=notmuch-archives.git Re: Possible some threads are not complete due to bug? --- diff --git a/5d/6926b438ac1f811a9313304f02ce36598617df b/5d/6926b438ac1f811a9313304f02ce36598617df new file mode 100644 index 000000000..eb1b19c3e --- /dev/null +++ b/5d/6926b438ac1f811a9313304f02ce36598617df @@ -0,0 +1,159 @@ +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 9517D6DE0943 + for ; Sun, 13 Sep 2015 08:10:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.575 +X-Spam-Level: +X-Spam-Status: No, score=-0.575 tagged_above=-999 required=5 + tests=[AWL=-0.005, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, + DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] 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 Hl6v9zx3tlni for ; + Sun, 13 Sep 2015 08:10:08 -0700 (PDT) +Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com + [209.85.218.53]) + by arlo.cworth.org (Postfix) with ESMTPS id F39246DE0274 + for ; Sun, 13 Sep 2015 08:10:07 -0700 (PDT) +Received: by oixx17 with SMTP id x17so65198384oix.0 + for ; Sun, 13 Sep 2015 08:10:06 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=mime-version:in-reply-to:references:date:message-id:subject:from:to + :content-type; bh=9/mpiUodtCmoGeVG968ev6gFmVxp6qWx7rk2hCComjY=; + b=RfU1SglHYi7O1d+KL1x/iAeMT2DJBFtvu1RWSmBS/Dzt1m/Q41RJovKignv+rQUUSe + 6DwZ772vc/ilPJzDgeMcwJyFKm3M4Iwc/StY5DqklanKkRQ78btYxhZF3pBldh29Eici + Jf8JlGqoWCPC4hCAZtUcRLJi/iRBGB7WssTqM+d6GwA6yFBjymcq8vCwjKqmWOUarGad + +Z4sfU+fIMa+dpBPMN6dXcQW4Bcrr5y5fXtAbpDITMVzatrxNpsKxPMB1sEE+TkNkLGa + HM9IO/eZ++D9ZBpbJByE08A36i7bZgn8MW6YMSMYAopfAHGUDdAGTmaZGWxXRYs4MaAr + 5wEA== +MIME-Version: 1.0 +X-Received: by 10.202.232.12 with SMTP id f12mr6548863oih.122.1442157005826; + Sun, 13 Sep 2015 08:10:05 -0700 (PDT) +Received: by 10.202.212.204 with HTTP; Sun, 13 Sep 2015 08:10:05 -0700 (PDT) +In-Reply-To: <20150913061945.GD18353@chitra.no-ip.org> +References: + + <20150913061945.GD18353@chitra.no-ip.org> +Date: Sun, 13 Sep 2015 11:10:05 -0400 +Message-ID: + +Subject: Re: Possible some threads are not complete due to bug? +From: Xu Wang +To: notmuch@notmuchmail.org +Content-Type: text/plain; charset=UTF-8 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Sun, 13 Sep 2015 15:10:10 -0000 + +On Sun, Sep 13, 2015 at 2:19 AM, Suvayu Ali wrote: +> Hi, +> +> You should include a reference to the original message, not everyone +> will remember the thread. +> +> id:20150614082258.GD17381@chitra.no-ip.org or +> + +Ah yes thank you. + +> On Sun, Sep 13, 2015 at 12:03:20AM -0400, Xu Wang wrote: +>> +>> Sometimes I need to do: +>> +>> $ notmuch search --output=threads "id:MYMSGID" +>> thread:000000000000a125 +>> $ notmuch search --output=messages "thread:000000000000a125" +> +> Looking at the script again, I see I assumed a message will belong to a +> single thread. You can remove that assumption by applying the following +> change. +> +> -----8<--------------------8<----- +> diff -u nm-ack nm-ack +> --- nm-ack 2015-06-15 01:30:40.327556510 +0200 +> +++ nm-ack 2015-09-13 07:58:30.734096931 +0200 +> @@ -10,8 +10,9 @@ +> # debug +> # set -o xtrace +> +> -declare query="$1" thread=$(notmuch search --output=threads -- "$1") +> -declare -a msgs=$(notmuch search --output=messages -- "$thread") responses +> +declare query="$1" +> +declare -a thread=$(notmuch search --output=threads -- "$1") +> +declare -a msgs=$(notmuch search --output=messages -- "${thread[@]}") responses +> +> function strip_mid() { +> sed -e 's/ \+//g' -e 's/<\([^ <>]\+\)>/\1/g' +> ----->8-------------------->8----- +> +>> In theory, this should output the message that responded to message ID +>> "MYMSGID". Sometimes it works. But sometimes it does not work. That +>> is, there exists an email where I am sure (I checked the raw email) +>> that there is a header +>> In-Reply-To: +>> but that email does not show when I do the two commands above. +>> Indeed, that mail belongs to a different thread ID. +>> +>> I am just curious if the above is due to: +>> +>> 1. My missing of understanding of how notmuch deals with threads +>> 2. A bug or missing feature in notmuch causes some threads to be incomplete +> +> Interesting issue. I can think of a case, say a message is cross-posted +> to multiple lists, it might then give you more than one thread ids. Is +> this the case for your message? If you are up for it, look in +> lib/thread.cc. I think the relevant methods are: +> _resolve_thread_relationships and _notmuch_thread_create, but I could be +> wrong. I'm not familiar with the notmuch source. +> +> As I recall, you are using mutt-kz; does work from +> mutt-kz? I would expect that to fail too. It gets the thread id like +> this: +> +> id = notmuch_message_get_thread_id(msg); +> +> Hope this helps, + +Thanks so very much as always Suvayu. I learn a great amount of +knowledge from you. +I tried the fixes and nothing changed. The message IDs had different +threads. did not work in mutt-kz. However, when I +viewed [all mail] (from Gmail) so that the messages were in the same +mailbox, mutt recognized they were a thread (in the sense of the +down-right arrow signifying a reply). + +In the end, I removed the .notmuch folder and ran 'notmuch new' to +regenerate everything. This worked! However I am wondering why I had +to do that. Is there any case where doing a complete refresh should be +done as opposed to "notmuch new" (which I do all the time)? +It appears that thread detection works different when adding messages +as opposed to a complete refresh? + +Kind regards, + +Xu + +> -- +> Suvayu +> +> Open source is the future. It sets us free. +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch