Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / 512ca767b61495038fbd59d30dc55e258ef473
1 Return-Path: <tomi.ollila@nixu.com>\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 1DC45429E21\r
6         for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 04:20:27 -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 ya1Ud6aqBwn7 for <notmuch@notmuchmail.org>;\r
16         Thu, 17 Nov 2011 04:20:26 -0800 (PST)\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 1F851431FD0\r
21         for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 04:20:25 -0800 (PST)\r
22 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
23         by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
24         pAHCKJBB011190; Thu, 17 Nov 2011 14:20:19 +0200\r
25 From: Tomi Ollila <tomi.ollila@iki.fi>\r
26 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
27         Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
28 Subject: Re: [PATCH 0/9] test: (hopefully) better test prerequisites\r
29 In-Reply-To: <874ny36rhc.fsf@servo.finestructure.net>\r
30 References: <1321494986-18998-1-git-send-email-dmitry.kurochkin@gmail.com>\r
31         <874ny36rhc.fsf@servo.finestructure.net>\r
32 User-Agent: Notmuch/0.9+73~ged20210 (http://notmuchmail.org) Emacs/23.3.1\r
33         (i686-pc-linux-gnu)\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
35         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
36         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
37 Date: Thu, 17 Nov 2011 14:20:19 +0200\r
38 Message-ID: <yf64ny3gcu4.fsf@taco2.nixu.fi>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain; charset=us-ascii\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Thu, 17 Nov 2011 12:20:27 -0000\r
54 \r
55 On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
56\r
57 > However, when I tried to test the tests with the patch applied I ran\r
58 > into one problem.  If I try to run the test suite with dtach\r
59 > uninstalled, it looks like I'm experiencing a hang on\r
60 > emacs_deliver_message call.  I wonder if either emacs_deliver_message or\r
61 > test_emacs is not doing the right thing in the case of no dtach.  I\r
62 > think emacs_deliver_message should somehow not require dtach, since it's\r
63 > not actually testing any display stuff, but because it's currently using\r
64 > test_emacs, it is somehow implicitly depending on it.  Any thoughts on\r
65 > how to fix that?\r
66 \r
67 Quick thought\r
68 \r
69 mk_skip_test_emacs () \r
70 { test_emacs () \r
71   { \r
72         echo SKIPPED\r
73         false\r
74   }\r
75   test_emacs\r
76 }\r
77 \r
78 mk_run_test_emacs () \r
79 { test_emacs () \r
80   {\r
81         emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"\r
82   }\r
83   test_emacs\r
84 }\r
85 \r
86 test_emacs ()\r
87 {\r
88         which dtach >/dev/null 2>&1 || { mk_skip_test_emacs; return; }\r
89         which emacs >/dev/null 2>&1 || { mk_skip_test_emacs; return; }\r
90         which emacsclient >/dev/null 2>&1 || { mk_skip_test_emacs; return; }\r
91 \r
92         EMACS_SERVER="notmuch-test-suite-$$"\r
93         # start a detached session with an emacs server\r
94         # user's TERM is given to dtach which assumes a minimally\r
95         # VT100-compatible terminal -- and emacs inherits that\r
96         TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \\r
97                 sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \\r
98                         --no-window-system \\r
99                         --eval '(setq server-name \"$EMACS_SERVER\")' \\r
100                         --eval '(server-start)' \\r
101                         --eval '(orphan-watchdog $$)'" ||\r
102                         { mk_skip_test_emacs; return; }\r
103         # wait until the emacs server is up\r
104         for _ in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 20 1 2 3 4 5 6 7 8 9 30\r
105         do \r
106                 if test_emacs '()' 2>/dev/null\r
107                 then\r
108                         mk_run_test_emacs\r
109                         return\r
110                 fi\r
111         done\r
112         mk_skip_test_emacs\r
113 }\r
114 \r
115 I.e. dynamically, at run-time, re-create test_emacs function...\r
116 \r
117\r
118 > jamie.\r
119 \r
120 Tomi\r