[PATCH] News for emacs saved-searches change.
[notmuch-archives.git] / 94 / 84e41f644eebabb30d0863762470c5201cc47f
1 Return-Path: <m.walters@qmul.ac.uk>\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 4B2CC431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 12 Sep 2013 05:10:03 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 awBXtGyGaJvh for <notmuch@notmuchmail.org>;\r
17         Thu, 12 Sep 2013 05:09:58 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 5CD92431FAE\r
22         for <notmuch@notmuchmail.org>; Thu, 12 Sep 2013 05:09:58 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1VK5ia-0000mo-E7; Thu, 12 Sep 2013 13:09:55 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1VK5ia-00066n-4a; Thu, 12 Sep 2013 13:09:52 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, David Bremner <david@tethera.net>,\r
33         notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH] emacs: show: stop stderr appearing in buffer\r
35 In-Reply-To: <m2vc26p8e4.fsf@guru.guru-group.fi>\r
36 References: <1378502198-7980-1-git-send-email-markwalters1009@gmail.com>\r
37         <87r4cwojds.fsf@zancas.localnet> <87ppsepeo9.fsf@qmul.ac.uk>\r
38         <m2vc26p8e4.fsf@guru.guru-group.fi>\r
39 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1\r
40         (x86_64-pc-linux-gnu)\r
41 Date: Thu, 12 Sep 2013 13:09:51 +0100\r
42 Message-ID: <87ob7yw8a8.fsf@qmul.ac.uk>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 X-Sender-Host-Address: 93.97.24.31\r
46 X-QM-SPAM-Info: Sender has good ham record.  :)\r
47 X-QM-Body-MD5: 3ac8814496b6b6f0add9988e5e993f41 (of first 20000 bytes)\r
48 X-SpamAssassin-Score: 0.0\r
49 X-SpamAssassin-SpamBar: /\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
51         determine if it is\r
52         spam. We require at least 5.0 points to mark a message as spam.\r
53         This message scored 0.0 points. Summary of the scoring: \r
54         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
55         provider *      (markwalters1009[at]gmail.com)\r
56         *  0.0 AWL AWL: From: address is in the auto white-list\r
57 X-QM-Scan-Virus: ClamAV says the message is clean\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Thu, 12 Sep 2013 12:10:03 -0000\r
71 \r
72 \r
73 On Thu, 12 Sep 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
74 > On Thu, Sep 12 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
75 >\r
76 >> Hi\r
77 >>\r
78 >> On Tue, 10 Sep 2013, David Bremner <david@tethera.net> wrote:\r
79 >>>> Ideally, we would put this output in the notmuch errors buffer but the\r
80 >>>> handler is called asynchronously so we don't know when the output will\r
81 >>>> appear. Thus if we put it straight into the errors buffer it could get\r
82 >>>> interleaved with other errors, otoh we can't easily tell when we\r
83 >>>> have got all the error output so can't wait until the process is complete.\r
84 >>>\r
85 >>> Hi Mark;\r
86 >>>\r
87 >>> I think your patch is OK, but would it be much harder to created a named\r
88 >>> buffer like *notmuch-view-$message-d* ? (using e.g. the code from\r
89 >>> notmuch-show). I might make debugging easier.\r
90 >>\r
91 >> Yes this is easy. There are several possibilities and I am not sure\r
92 >> which is best (some are clearly bad but are worth mentioning anyway).\r
93 >>\r
94 >> 1) have a single buffer for part errors; this would accumulate stuff and\r
95 >> output seems to get interleaved so this is probably useless.\r
96 >>\r
97 >> 2) have a buffer for each part viewer as you describe.\r
98 >>\r
99 >> 3) have a buffer for each part viewer but start its name with a space so\r
100 >> it doesn't show up in buffer lists but is findable (maybe)\r
101 >>\r
102 >> 4) stick with just the temp buffer approach\r
103 >\r
104 >\r
105 > Maybe check whether the temp buffer is empty. if not, use\r
106 > (buffer-string) & (notmuch-logged-error) to append the message\r
107 > to the *Notmuch errors* buffer... just that notmuch-logged-error\r
108 > signals an error which we may not want to do...\r
109 \r
110 The problem is that the external part viewer is run asynchronously. So\r
111 when we get to the decision what to do the buffer has not received any\r
112 output yet even when the first thing the viewer does is output\r
113 something.\r
114 \r
115 A further complication is that in some cases the viewer might not\r
116 output things until it is closed and that could be arbitrarily later.\r
117 \r
118 Best wishes\r
119 \r
120 Mark\r
121 \r
122 \r
123 >\r
124 > We could unify to "*Notmuch Messages*" and have more functions to \r
125 > append data there... somewhat analogous to current *Messages* buffer\r
126 > just that that one has so much noise...\r
127 >\r
128 > Tomi\r
129 >\r
130 >\r
131 >>\r
132 >> Also, we could have it togglable with some sort of debug flag. In some\r
133 >> senses 3 is nice but you would probably end up with 10's or even\r
134 >> hundreds of hidden buffers which seems bad. In 2 you see them so you\r
135 >> probably kill them as you go but I think they would be pretty\r
136 >> annoying. A key difference from the accumulated show/search/pick buffers\r
137 >> is that, at some point, you did want to see those buffers.\r
138 >>\r
139 >> Since all these approaches are easy to implement it is really up to us\r
140 >> which we want.\r
141 >>\r
142 >> Any thoughts?\r
143 >>\r
144 >> Mark\r
145 >>\r
146 >>\r
147 >>>\r
148 >>> Of course those buffers would accumulate, along with show, search and\r
149 >>> pick buffers...\r
150 >>>\r
151 >>> Or we could push this as is, and add some debugging facility later like\r
152 >>> a variable notmuch-view-errors-buffer.\r
153 >>>\r
154 >>> d\r
155 >> _______________________________________________\r
156 >> notmuch mailing list\r
157 >> notmuch@notmuchmail.org\r
158 >> http://notmuchmail.org/mailman/listinfo/notmuch\r