1 Return-Path: <tomi.ollila@iki.fi>
\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 arlo.cworth.org (Postfix) with ESMTP id E3C366DE0B44
\r
6 for <notmuch@notmuchmail.org>; Wed, 28 Oct 2015 13:18:29 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.744 tagged_above=-999 required=5 tests=[AWL=0.092,
\r
12 SPF_NEUTRAL=0.652] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id FJJU7YmCpKv6 for <notmuch@notmuchmail.org>;
\r
16 Wed, 28 Oct 2015 13:18:27 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by arlo.cworth.org (Postfix) with ESMTP id D4CD66DE0AF8
\r
19 for <notmuch@notmuchmail.org>; Wed, 28 Oct 2015 13:18:25 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 18B35100046;
\r
22 Wed, 28 Oct 2015 22:18:26 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org,
\r
26 Subject: Re: [PATCH] emacs: poll: return useful errors when poll fails.
\r
27 In-Reply-To: <1446056919-27822-1-git-send-email-markwalters1009@gmail.com>
\r
28 References: <87bnd5qjnd.fsf@wespe.malde.org>
\r
29 <1446056919-27822-1-git-send-email-markwalters1009@gmail.com>
\r
30 User-Agent: Notmuch/0.21~rc3+7~g28030b0 (http://notmuchmail.org) Emacs/24.3.1
\r
31 (x86_64-unknown-linux-gnu)
\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
33 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
34 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
35 Date: Wed, 28 Oct 2015 22:18:26 +0200
\r
36 Message-ID: <m27fm6lpbh.fsf@guru.guru-group.fi>
\r
38 Content-Type: text/plain
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.20
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Wed, 28 Oct 2015 20:18:30 -0000
\r
53 On Wed, Oct 28 2015, Mark Walters <markwalters1009@gmail.com> wrote:
\r
55 > Previously poll called from emacs would fail silently. This makes it
\r
56 > return a useful error message.
\r
58 > In the non-deprecated case of notmuch new and appropriate hooks, it
\r
59 > uses notmuch-call-notmuch-process which gives an error and
\r
60 > additionally puts the stdout/stderr etc in the *Notmuch errors*
\r
63 > In the deprecated case of a custom poll script it only returns an
\r
66 > Commit based on a bug report, and a potential fix, by Ketil Malde.
\r
69 Looks good (to me) -- I investigated a bit how notmuch-call-notmuch-process
\r
70 does things; it uses notmuch-check-exit-status which is not applicable
\r
73 Mark said he doesn't use poll -- and I have rewritten my poll(*) so my
\r
74 tests will be as lightweight as his. So we wait for Ketil's report
\r
79 (*) see at the end of this email
\r
82 > This should fix the bug reported in the parent message -- we should
\r
83 > definitely report error messages. It might be nice to output the
\r
84 > stdout/stderr in the custom poll script case but since we don't have
\r
85 > built in infrastructure for it it probably isn't worth it for a
\r
88 > (Note I don't use poll, so this is not heavily tested)
\r
95 For reference, if anyone gets ideas from this...
\r
97 ;; overwrite notmuch-poll defined in notmuch.el
\r
98 (defun notmuch-poll ()
\r
100 (save-window-excursion
\r
101 (let ((buffer (get-buffer-create "*my notmuch polls*")))
\r
102 (set-buffer buffer)
\r
103 (setq buffer-read-only nil)
\r
104 (goto-char (point-max))
\r
105 (pop-to-buffer buffer)
\r
106 (call-process "notmuch-log-output.sh" nil t t "new" "--verbose")
\r
107 (bury-buffer))) ;; <- b-b to put the buffer at the "bottom" of buffers
\r
108 (message "update finished"))
\r