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 16DAE41ED70
\r
6 for <notmuch@notmuchmail.org>; Fri, 13 Jan 2012 11:18:19 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 9UsEvP2hNIBA for <notmuch@notmuchmail.org>;
\r
16 Fri, 13 Jan 2012 11:18:18 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 903E842119C
\r
20 for <notmuch@notmuchmail.org>; Fri, 13 Jan 2012 11:18:18 -0800 (PST)
\r
21 X-AuditID: 12074425-b7f4a6d0000008e0-e3-4f1083799380
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id DF.E6.02272.973801F4; Fri, 13 Jan 2012 14:18:18 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q0DJIHbD026913;
\r
27 Fri, 13 Jan 2012 14:18:17 -0500
\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.6/8.12.4) with ESMTP id q0DJIFFZ001349
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 13 Jan 2012 14:18:16 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1Rlmdj-0008OE-HU; Fri, 13 Jan 2012 14:18:15 -0500
\r
37 Date: Fri, 13 Jan 2012 14:18:15 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Tomi Ollila <tomi.ollila@iki.fi>
\r
40 Subject: Re: [PATCH] test: make (kill-emacs) from emacsclient work with emacs
\r
42 Message-ID: <20120113191815.GJ18625@mit.edu>
\r
43 References: <20120112170244.GB18625@mit.edu>
\r
44 <1326442648-5060-1-git-send-email-tomi.ollila@iki.fi>
\r
46 Content-Type: text/plain; charset=us-ascii
\r
47 Content-Disposition: inline
\r
48 In-Reply-To: <1326442648-5060-1-git-send-email-tomi.ollila@iki.fi>
\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IR4hRV1q1qFvA3uDmZ0eL6zZnMFm9WzmN1
\r
52 YPI4/HUhi8ezVbeYA5iiuGxSUnMyy1KL9O0SuDLe3T7OXnCIq2Lfxw9MDYyHOboYOTkkBEwk
\r
53 NvRtZ4GwxSQu3FvP1sXIxSEksI9RYsLFJnYIZwOjxMszt5kgnJNMEpu7r0FlljBKLJvxC6yf
\r
54 RUBV4m3rQ3YQm01AQ2Lb/uWMILaIgIrEg7b1rCA2s4C0xLffzUwgtrBAhMS1W0/BbF4BHYn2
\r
55 kxA1QgIpEstWzmWFiAtKnJz5hAWiV0vixr+XQPUcYHOW/wN7gVPASaKn8QFYiSjQqiknt7FN
\r
56 YBSahaR7FpLuWQjdCxiZVzHKpuRW6eYmZuYUpybrFicn5uWlFula6OVmluilppRuYgQFNruL
\r
57 6g7GCYeUDjEKcDAq8fBKZgn4C7EmlhVX5h5ilORgUhLlfdEAFOJLyk+pzEgszogvKs1JLT7E
\r
58 KMHBrCTCK2UKlONNSaysSi3Kh0lJc7AoifNqar3zExJITyxJzU5NLUgtgsnKcHAoSfCebgJq
\r
59 FCxKTU+tSMvMKUFIM3FwggznARq+B6SGt7ggMbc4Mx0if4pRUUqcdxVIQgAkkVGaB9cLSzyv
\r
60 GMWBXhHm3QtSxQNMWnDdr4AGMwENLkvhAxlckoiQkmpgLNd/xLf/4OpDzz4d8E3+xhPQefgF
\r
61 p/lEx+ba9eE1YasfVJzO9jaf57v38Pb4qJ1X5pdofLhW8WmaWsSl3p3MdXVs77ODXVTsV809
\r
62 svdBvFOxn8DmjMbVmWUiGwtCzXrtv0xXyzet1tn1ZKVf+hw+qwc7l4gd0Fjjtn9a7c+lC597
\r
63 GYbLzd+TocRSnJFoqMVcVJwIADfrOYgXAwAA
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Fri, 13 Jan 2012 19:18:19 -0000
\r
81 Quoth Tomi Ollila on Jan 13 at 10:17 am:
\r
82 > emacsclient --eval '(kill-emacs)' makes emacs versions 23.1
\r
83 > and 23.2 ask user input from running emacs. Redefining
\r
84 > yes-or-no-p function when kill-emacs is executed for these
\r
85 > emacs versions in test-lib.el avoids this test problem.
\r
87 > Thanks Austin for your comments. Including 'activate' into defadvice
\r
88 > made it possible to use if (well, without progn...) instead of when
\r
89 > which makes this also marginally faster (as we're not byte-compiling
\r
92 > test/test-lib.el | 7 +++++++
\r
93 > 1 files changed, 7 insertions(+), 0 deletions(-)
\r
95 > diff --git a/test/test-lib.el b/test/test-lib.el
\r
96 > index 3b817c3..59c5868 100644
\r
97 > --- a/test/test-lib.el
\r
98 > +++ b/test/test-lib.el
\r
99 > @@ -26,6 +26,13 @@
\r
101 > (setq read-file-name-function (lambda (&rest _) (read)))
\r
103 > +;; Work around a bug in emacs 23.1 and emacs 23.2 which prevents
\r
104 > +;; noninteractive (kill-emacs) from emacsclient.
\r
105 > +(if (and (= emacs-major-version 23) (< emacs-minor-version 3))
\r
106 > + (defadvice kill-emacs (before disable-yes-or-no-p activate)
\r
107 > + "Disable yes-or-no-p before executing kill-emacs"
\r
108 > + (defun yes-or-no-p (prompt) t)))
\r
110 > (defun notmuch-test-wait ()
\r
111 > "Wait for process completion."
\r
112 > (while (get-buffer-process (current-buffer))
\r