Re: Query to get emails from notmuch mailing list?
[notmuch-archives.git] / b2 / 1cc0becb93b914c87a89ed84d819e3af8d401f
1 Return-Path: <johannes@mailless.org>\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 B4E3B431FD4\r
6         for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 07:07:14 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id agbf35gIcIR9 for <notmuch@notmuchmail.org>;\r
16         Tue, 27 Aug 2013 07:07:07 -0700 (PDT)\r
17 Received: from mailless.org (mailless.org [46.163.73.148])\r
18         by olra.theworths.org (Postfix) with SMTP id D20CD431FAF\r
19         for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 07:07:06 -0700 (PDT)\r
20 Received: (qmail 7885 invoked from network); 27 Aug 2013 14:07:05 -0000\r
21 Received: from unknown (HELO localhost) (johannes@192.124.26.172)\r
22         by mailless.org with ESMTPA; 27 Aug 2013 14:07:05 -0000\r
23 Content-Type: multipart/signed; protocol="application/pgp-signature";\r
24         micalg="pgp-sha1"; boundary="===============5566596592336054078=="\r
25 MIME-Version: 1.0\r
26 Content-Disposition: inline\r
27 To: Austin Clements <amdragon@MIT.EDU>, \r
28 From: Johannes Kulick <johannes@mailless.org>\r
29 In-Reply-To: <20130827134723.GQ13257@mit.edu>\r
30 References: <20130825101308.27461.57489@quirm.robotics.tu-berlin.de>\r
31         <20130826222226.1093.84929@quirm.robotics.tu-berlin.de>\r
32         <87li3o9dwr.fsf@zancas.localnet>\r
33         <20130827115004.11629.64740@quirm.robotics.tu-berlin.de>\r
34         <20130827134723.GQ13257@mit.edu>\r
35 Message-ID: <20130827140654.31336.307@quirm.robotics.tu-berlin.de>\r
36 User-Agent: alot/0.3.5\r
37 Subject: Re: Feature proposal: OUTPUT_AUTHOR format\r
38 Date: Tue, 27 Aug 2013 16:06:54 +0200\r
39 Cc: notmuch@notmuchmail.org\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Tue, 27 Aug 2013 14:07:14 -0000\r
53 \r
54 --===============5566596592336054078==\r
55 Content-Type: text/plain; charset="utf-8"\r
56 MIME-Version: 1.0\r
57 Content-Transfer-Encoding: quoted-printable\r
58 \r
59 > What's the advantage to adding this to the library?  Why not just\r
60 > notmuch_query_search_messages, iterate over the messages and use\r
61 > notmuch_message_get_header(msg, "from") to accumulate the author\r
62 > information, and then output that?  Unless I'm overlooking something\r
63 > (which is possible), there are no algorithmic advantages to doing this\r
64 > in the library.\r
65 \r
66 \r
67 The view I have in mind would look something like:\r
68 \r
69 John Doe (1234 msg)\r
70 |- first thread subject\r
71 |- second thread subject\r
72 |- third thread subject\r
73 Jane Doe (234 msg)\r
74 |- first thread subject\r
75 |- second thread subject\r
76 |- third thread subject\r
77 ...\r
78 \r
79 \r
80 The problem is, that if I want to have a list of all authors in the databas=\r
81 e I'd\r
82 have to iterate over all messages (naively implemented, whenever I render t=\r
83 he\r
84 view, or I somehow have to persistently store this list and update it on a\r
85 regular basis), whereas the notmuch database already has this information b=\r
86 ut\r
87 doesn't reveal if I'm not overlooking something. To do a\r
88 notmuch_query_search_messages I'd have to know what to search for, whereas a\r
89 notmuch_database_get_all_authors would give me exactly what I'm looking for=\r
90  in\r
91 short time since it is already indexed by xapian.\r
92 \r
93 Best,\r
94 Johannes\r
95 \r
96 --===============5566596592336054078==\r
97 MIME-Version: 1.0\r
98 Content-Transfer-Encoding: 7bit\r
99 Content-Description: signature\r
100 Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"\r
101 \r
102 -----BEGIN PGP SIGNATURE-----\r
103 Version: GnuPG v2.0.20 (GNU/Linux)\r
104 \r
105 iQEcBAABAgAGBQJSHLJ+AAoJEBiRJNhhEUhOYrQH/2tmIopguoNlnepIgcI52JRY\r
106 Yuis52XGbverFYBoZEgeI36DSQghlNeBYakYcWYmHf9a6ZkxVtWR6arrXp3A1pCb\r
107 eSm4ZqDowA1qTaAh9mMlIGWwRkSAS5meJulf9Yhmnv353AJsZvrJz8283bUrULjM\r
108 HhcJ/Uh7KF1gN1arfOxwsTtQNXjrPpUd1E0voNYERCGhX5cqLevrkJdrzUEv6+PF\r
109 lSl2b3701J8q86Pphm0Trr2AWEdMyZxMXJpOeF2+9l8vrTB1KAEhsyPO+7V2YfUx\r
110 sEoncvEGAvdRlK5KmlKp/Ql5HUwMUv+96nl1I6TMg2BWyHhxjgZHPmxyqI8ofkk=\r
111 =tIcK\r
112 -----END PGP SIGNATURE-----\r
113 \r
114 --===============5566596592336054078==--\r