Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / 380886848b7a3564f8ca7c59947aa4644f8631
1 Return-Path: <amdragon@mit.edu>\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 22840431FD4\r
6         for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 06:47:41 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 kK4f8Ex+uy2o for <notmuch@notmuchmail.org>;\r
16         Tue, 27 Aug 2013 06:47:33 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu\r
18         [18.9.25.13])\r
19         by olra.theworths.org (Postfix) with ESMTP id 976F1431FAF\r
20         for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 06:47:33 -0700 (PDT)\r
21 X-AuditID: 1209190d-b7f078e000000937-c1-521cadf4664f\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id EF.8A.02359.4FDAC125; Tue, 27 Aug 2013 09:47:32 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r7RDlUK5023029; \r
27         Tue, 27 Aug 2013 09:47:31 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r7RDlRgE007416\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Tue, 27 Aug 2013 09:47:29 -0400\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1VEJcE-0005UV-55; Tue, 27 Aug 2013 09:47:26 -0400\r
37 Date: Tue, 27 Aug 2013 09:47:24 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Johannes Kulick <johannes@mailless.org>\r
40 Subject: Re: Feature proposal: OUTPUT_AUTHOR format\r
41 Message-ID: <20130827134723.GQ13257@mit.edu>\r
42 References: <20130825101308.27461.57489@quirm.robotics.tu-berlin.de>\r
43         <20130826222226.1093.84929@quirm.robotics.tu-berlin.de>\r
44         <87li3o9dwr.fsf@zancas.localnet>\r
45         <20130827115004.11629.64740@quirm.robotics.tu-berlin.de>\r
46 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Content-Disposition: inline\r
49 In-Reply-To: <20130827115004.11629.64740@quirm.robotics.tu-berlin.de>\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)\r
51 X-Brightmail-Tracker:\r
52  H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0f2yVibI4P8vAYuj37czWVy/OZPZ\r
53         gcljydfDjB7PVt1iDmCK4rJJSc3JLEst0rdL4Mpo3XaBveAub0XT8/nsDYzfuLoYOTgkBEwk\r
54         /v6K6WLkBDLFJC7cW8/WxcjFISSwj1Hi1Ou/jBDORkaJo//fQWVOM0lse3OSGcJZwihxaf0y\r
55         VpB+FgFViTVNPSwgNpuAhsS2/csZQVaICGhLnPruDRJmFpCW+Pa7mQnEFhYwltj9byEziM0r\r
56         oCNx9NItqAV3GCX+L1nCBpEQlDg58wkLRLOWxI1/L5lAZoIMWv6PAyTMKeAq0Tz9CdhMUQEV\r
57         iSknt7FNYBSahaR7FpLuWQjdCxiZVzHKpuRW6eYmZuYUpybrFicn5uWlFuka6eVmluilppRu\r
58         YgSFNack7w7GdweVDjEKcDAq8fA+aJEOEmJNLCuuzD3EKMnBpCTKm7NGJkiILyk/pTIjsTgj\r
59         vqg0J7X4EKMEB7OSCO/uFUA53pTEyqrUonyYlDQHi5I479OnZwOFBNITS1KzU1MLUotgsjIc\r
60         HEoSvOtBhgoWpaanVqRl5pQgpJk4OEGG8wAN/wxSw1tckJhbnJkOkT/FqCglznsCJCEAksgo\r
61         zYPrhaWdV4ziQK8I8zIAk5AQDzBlwXW/AhrMBDR42nywwSWJCCmpBsakfwb2k+qTKj2KXi8T\r
62         nra645nF87LLc16l8E7n4b3+efXVX3NXtvDv+dOr9/FEgqpwW2avEIvka/8TgXdzNkswfone\r
63         dsRyr6mk2ofwnGOWwtEKPyZt/b0hdMat6jcSC5Y31Ekmv3aWnf5ylnGFpH+Ota/eftfjnZvy\r
64         njNINdUa3HRWWMN7IkSJpTgj0VCLuag4EQCZMBztFgMAAA==\r
65 Cc: notmuch@notmuchmail.org\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Tue, 27 Aug 2013 13:47:41 -0000\r
79 \r
80 Quoth Johannes Kulick on Aug 27 at  1:50 pm:\r
81 > Hi David,\r
82 >       \r
83 > Quoting David Bremner (2013-08-27 02:27:00)\r
84 > > I'm not sure I understand your goal completely here, but the obvious\r
85 > > thing UI wise would be\r
86 > >\r
87 > >   notmuch search --output=authors --format=(json|text|sexp)  $search_terms\r
88 > >\r
89 > > Perhaps you're already aware of this, but alot doesn't use the CLI, so\r
90 > > that wouldn't be directly helpful to having a new view in alot.\r
91\r
92 > Do you mean, that this output=authors option is already available? Then I'm not\r
93 > aware. If it is not available it's exactly what I meant. So it would look\r
94 \r
95 No, --output=authors isn't currently available.\r
96 \r
97 > something like:\r
98\r
99 > $ notmuch search --output=authors from:Johannes\r
100 > Johannes Kulick (1234 msgs)\r
101 > Johannes Doe (123 msgs)\r
102 > Johannes Mueller (12 msgs)\r
103 > ...\r
104\r
105 > I'd sketch the way to implement it like this:\r
106\r
107 > - add notmuch_authors_t and notmuch_author_t structs\r
108 > - add a notmuch_database_get_all_authors (notmuch_database_t *db)\r
109 > - add the functions around that to actually get an option for the ui\r
110 > - add bindings for the other languages\r
111 \r
112 What's the advantage to adding this to the library?  Why not just\r
113 notmuch_query_search_messages, iterate over the messages and use\r
114 notmuch_message_get_header(msg, "from") to accumulate the author\r
115 information, and then output that?  Unless I'm overlooking something\r
116 (which is possible), there are no algorithmic advantages to doing this\r
117 in the library.\r
118 \r
119 As David pointed out, for alot you could do this right away, since it\r
120 uses the library directly.  For notmuch-emacs you would have to extend\r
121 the CLI along the lines you're imagining.\r
122 \r
123 > (- implement the view in the clients)\r
124\r
125 > Cheers,\r
126 > Johannes\r
127\r