Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 46 / 5700e465d0c957340773283c78be2bb0e157a8
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 olra.theworths.org (Postfix) with ESMTP id CD8CE431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 28 Nov 2012 00:05:15 -0800 (PST)\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 vute5j6ardIq for <notmuch@notmuchmail.org>;\r
16         Wed, 28 Nov 2012 00:05:15 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id C9621431FAE\r
19         for <notmuch@notmuchmail.org>; Wed, 28 Nov 2012 00:05:14 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id CC2591000E5;\r
22         Wed, 28 Nov 2012 10:05:12 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] test: Make the emacsclient binary user-configurable\r
26 In-Reply-To: <1354073099-14582-1-git-send-email-amdragon@mit.edu>\r
27 References: <1354073099-14582-1-git-send-email-amdragon@mit.edu>\r
28 User-Agent: Notmuch/0.14+116~g29fcdb5 (http://notmuchmail.org) Emacs/24.2.1\r
29         (x86_64-unknown-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Wed, 28 Nov 2012 10:05:12 +0200\r
34 Message-ID: <m2zk22w3t3.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Wed, 28 Nov 2012 08:05:15 -0000\r
50 \r
51 On Wed, Nov 28 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
52 \r
53 > And require that if TEST_EMACS is specified, so is TEST_EMACSCLIENT.\r
54 >\r
55 > Previously, the test framework always used "emacsclient", even if the\r
56 > Emacs in use was overridden by TEST_EMACS.  This causes problems if\r
57 > both Emacs 23 and Emacs 24 are installed, the Emacs 23 emacsclient is\r
58 > the system default, but TEST_EMACS is set to emacs24.  Specifically,\r
59 > with an Emacs 24 server and an Emacs 23 client, emacs tests that run\r
60 > very quickly may produce no output from emacsclient, causing the test\r
61 > to fail.\r
62 >\r
63 > The Emacs server uses a very simple line-oriented protocol in which\r
64 > the client sends a request to evaluate an expression and the server\r
65 > sends a request to print the result of evaluation.  Prior to Emacs bzr\r
66 > commit 107565 on March 11th, 2012 (released in Emacs 24.1), if\r
67 > multiple commands were sent to the emacsclient between when it sent\r
68 > the evaluation command and when it entered its receive loop, it would\r
69 > only process the first response command, ignoring the rest of the\r
70 > received buffer.  This wasn't a problem with the Emacs 23 server\r
71 > because it sent only the command to print the evaluation result.\r
72 > However, the Emacs 24 server first sends an unprompted command\r
73 > specifying the PID of the Emacs server, then processes the evaluation\r
74 > request, then sends the command to print the result.  If the\r
75 > evaluation is fast enough, it can send both of these commands before\r
76 > emacsclient enters the receive loop.  Hence, if an Emacs 24 server is\r
77 > used with an Emacs 23 emacsclient, it may miss the response printing\r
78 > command, ultimately causing intermittent notmuch test failures.\r
79 > ---\r
80 \r
81 Looks good to me (especially commit message)\r
82 \r
83 I guess buildbot configuration needs to be fixed to set\r
84 TEST_EMACSCLIENT too (now that it is possible as it probably\r
85 sets TEST_EMACS already...)\r
86 \r
87 Tomi\r
88 \r
89 \r
90 >  test/README      |   10 +++++-----\r
91 >  test/test-lib.sh |   12 +++++++++---\r
92 >  2 files changed, 14 insertions(+), 8 deletions(-)\r
93 >\r
94 > diff --git a/test/README b/test/README\r
95 > index 6dc3034..81c232d 100644\r
96 > --- a/test/README\r
97 > +++ b/test/README\r
98 > @@ -69,12 +69,12 @@ can be specified as follows:\r
99 >  \r
100 >       make test OPTIONS="--verbose"\r
101 >  \r
102 > -You can choose an emacs binary to run the tests in one of the\r
103 > -following ways.\r
104 > +You can choose an emacs binary (and corresponding emacsclient) to run\r
105 > +the tests in one of the following ways.\r
106 >  \r
107 > -     TEST_EMACS=my-special-emacs make test\r
108 > -     TEST_EMACS=my-special-emacs ./emacs\r
109 > -     make test TEST_EMACS=my-special-emacs\r
110 > +     TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient make test\r
111 > +     TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient ./emacs\r
112 > +     make test TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient\r
113 >  \r
114 >  Skipping Tests\r
115 >  --------------\r
116 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
117 > index 467b83c..e092231 100644\r
118 > --- a/test/test-lib.sh\r
119 > +++ b/test/test-lib.sh\r
120 > @@ -49,7 +49,13 @@ TZ=UTC\r
121 >  TERM=dumb\r
122 >  export LANG LC_ALL PAGER TERM TZ\r
123 >  GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}\r
124 > +if [[ ( -n "$TEST_EMACS" && -z "$TEST_EMACSCLIENT" ) || \\r
125 > +      ( -z "$TEST_EMACS" && -n "$TEST_EMACSCLIENT" ) ]]; then\r
126 > +    echo "error: must specify both or neither of TEST_EMACS and TEST_EMACSCLIENT" >&2\r
127 > +    exit 1\r
128 > +fi\r
129 >  TEST_EMACS=${TEST_EMACS:-${EMACS:-emacs}}\r
130 > +TEST_EMACSCLIENT=${TEST_EMACSCLIENT:-emacsclient}\r
131 >  \r
132 >  # Protect ourselves from common misconfiguration to export\r
133 >  # CDPATH into the environment\r
134 > @@ -969,7 +975,7 @@ test_emacs () {\r
135 >       missing_dependencies=\r
136 >       test_require_external_prereq dtach || missing_dependencies=1\r
137 >       test_require_external_prereq emacs || missing_dependencies=1\r
138 > -     test_require_external_prereq emacsclient || missing_dependencies=1\r
139 > +     test_require_external_prereq ${TEST_EMACSCLIENT} || missing_dependencies=1\r
140 >       test -z "$missing_dependencies" || return\r
141 >  \r
142 >       if [ -z "$EMACS_SERVER" ]; then\r
143 > @@ -1005,7 +1011,7 @@ test_emacs () {\r
144 >       rm -f OUTPUT\r
145 >       touch OUTPUT\r
146 >  \r
147 > -     emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"\r
148 > +     ${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(progn $@)"\r
149 >  }\r
150 >  \r
151 >  test_python() {\r
152 > @@ -1158,7 +1164,7 @@ rm -f y\r
153 >  # declare prerequisites for external binaries used in tests\r
154 >  test_declare_external_prereq dtach\r
155 >  test_declare_external_prereq emacs\r
156 > -test_declare_external_prereq emacsclient\r
157 > +test_declare_external_prereq ${TEST_EMACSCLIENT}\r
158 >  test_declare_external_prereq gdb\r
159 >  test_declare_external_prereq gpg\r
160 >  test_declare_external_prereq python\r
161 > -- \r
162 > 1.7.10.4\r
163 >\r
164 > _______________________________________________\r
165 > notmuch mailing list\r
166 > notmuch@notmuchmail.org\r
167 > http://notmuchmail.org/mailman/listinfo/notmuch\r