[PATCH v4 07/11] lib: added interface notmuch_thread_get_flag_messages
[notmuch-archives.git] / 88 / b8c436f088c116b898cd36146f815fb23d6275
1 Return-Path: <error4me@gmx.de>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id BAA80429E39\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 16:41:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id UwCfi52iH4QV for <notmuch@notmuchmail.org>;\r
17         Wed, 25 Jan 2012 16:41:08 -0800 (PST)\r
18 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23])\r
19         by olra.theworths.org (Postfix) with SMTP id F24F6431FBC\r
20         for <notmuch@notmuchmail.org>; Wed, 25 Jan 2012 16:41:07 -0800 (PST)\r
21 Received: (qmail invoked by alias); 26 Jan 2012 00:41:06 -0000\r
22 Received: from p54BE2204.dip.t-dialin.net (EHLO shi.workgroup) [84.190.34.4]\r
23         by mail.gmx.net (mp015) with SMTP; 26 Jan 2012 01:41:06 +0100\r
24 X-Authenticated: #19296480\r
25 X-Provags-ID: V01U2FsdGVkX18FwZJE6QwFPalCs8MifPMNpdh1NJrgSb8BT8CYs2\r
26         LSkfqvY67has6S\r
27 Received: from grfz by shi.workgroup with local (Exim 4.77)\r
28         (envelope-from <error4me@gmx.de>)\r
29         id 1RqDOP-0004Ur-5V; Thu, 26 Jan 2012 01:40:45 +0100\r
30 Date: Thu, 26 Jan 2012 01:40:24 +0100\r
31 From: Gregor Zattler <telegraph@gmx.net>\r
32 To: notmuch <notmuch@notmuchmail.org>\r
33 Subject: [Emacs] Bug?: notmuch-search-show-thread shows several threads; only\r
34         one containing matching messages\r
35 Message-ID: <20120126004024.GA13704@shi.workgroup>\r
36 Mail-Followup-To: notmuch <notmuch@notmuchmail.org>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain; charset=us-ascii\r
39 Content-Disposition: inline\r
40 User-Agent: Mutt/1.5.21 (2010-09-15)\r
41 X-Y-GMX-Trusted: 0\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Thu, 26 Jan 2012 00:41:09 -0000\r
55 \r
56 [sorry for the long and meandering explanation, I do not know how\r
57 to express the issue more concise]\r
58 \r
59 Dear notmuch developers,\r
60 \r
61 may someone please enlighten me regarding this behaviour: \r
62 \r
63 I experienced a situation where the Emacs interface shows three\r
64 (3) different threads in one notmuch show buffer.  I thought it\r
65 should show only one.  Perhaps this is the result of notmuch show\r
66 showing messages which do not match the search pattern and do not\r
67 belong to one thread which contains messages which do so.[1]\r
68 \r
69 \r
70 What I did:\r
71 \r
72 I remembered a thread on the Emacs-orgmode mailing list about\r
73 date ranges in various Emacs implementations/compilations and\r
74 searched for it with this search expression:\r
75 \r
76 folder:orgmode date 64 bit 32\r
77 \r
78 it resulted in a *notmuch-search-folder:orgmode date 64 bit 32*\r
79 buffer containing 5 lines with matching threads, one of it with 7\r
80 out of 99 matching messages and the subject "[O]: dates before\r
81 1970", I selected this one with RET (notmuch-search-show-thread)\r
82 and got a notmuch show mode buffer.\r
83 \r
84 The buffer begins with this thread (which is the one I\r
85 remembered: ~20 messages) but contains 2 more totally different\r
86 threads ("[O] Slow movement in large buffers" and "[O] The\r
87 Org->ODT exporter is now in Org's core") with no matching\r
88 messages at all (at least all of the messages are\r
89 invisible/folded).  The starting messages of these two additional\r
90 threads were shown with no indentation -- because they start a\r
91 thread.\r
92 \r
93 I don't know for sure if the broad search pattern really does not\r
94 apply to at least some of the messages in the 2 additional\r
95 threads.[1]  But even if: why are they part of the same \r
96 buffer resulting from notmuch-search-show-thread?\r
97 \r
98 In order to further investigate this phenomenon I run notmuch from\r
99 the command line like:\r
100 notmuch show  --entire-thread  --format=mbox   folder:orgmode date 64 bit 32 >/tmp/date64.mbox\r
101 \r
102 and opened the resulting mbox with mutt.  mutt showed the thread\r
103 I was interested in and several other threads which are not part\r
104 of this one.  I isolated the thread I was interested in,\r
105 extracted the message ids of its messages and greped the rest of\r
106 the messages for this message ids: no matches.[2] Therefore no of\r
107 the rests messages are part of the thread I was interested in but\r
108 some of them were also part of the notmuch show buffer alongside\r
109 the one thread I was interested in.\r
110 \r
111 My expectation was to only see one thread: the one with the\r
112 matching messages.\r
113 \r
114 So this about the Emacs interface and perhaps about what a\r
115 notmuch search matches.\r
116 \r
117 Can somebody please explain this to me?  Since all relevant\r
118 messages are public I am able to provide the relevant messages as\r
119 one mbox file (2.9 MB).\r
120 \r
121 \r
122 Ciao, Gregor\r
123 -- \r
124 [1] I don't know how to test if messages should show up in an\r
125     notmuch serch query with "date bit 64 32" being the serach\r
126     pattern.  When I did a rgrep -l -I date\r
127     /tmp/unmatched.maildir|xargs egrep -l -I bit |xargs egrep -l\r
128     -I 64|xargs egrep -l -I 32 I got many hits but this is to be\r
129     expected since every e-mail has a "Date" header and enough\r
130     headers to match "64" and "32" and since its a mailing list\r
131     discussion software "bit" is also to be expected in these\r
132     e-mails.\r
133 \r
134 [2] grep -I "^Message-Id:" /tmp/thread-I-m-interested-in.mbox |sed -e "s/Message-Id: <//I" -e "s/>$//" >really.mid\r
135     grep -I -F really.mid rest.mbox\r
136     --> no match\r