Re: [PATCH v4 3/5] Use the S-Expression structured printer in notmuch-show, notmuch...
[notmuch-archives.git] / ae / bb450a115b807dd366c49dc3227a99e387651f
1 Return-Path: <dmitry.kurochkin@gmail.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 1289742118E\r
6         for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 12:42:49 -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: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 jOb2lcxdM+X3 for <notmuch@notmuchmail.org>;\r
17         Wed, 29 Jun 2011 12:42:47 -0700 (PDT)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 437D6421186\r
22         for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 12:42:47 -0700 (PDT)\r
23 Received: by bwg12 with SMTP id 12so1456477bwg.26\r
24         for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 12:42:45 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:date:message-id:x-mailer;\r
27         bh=DXeJ8xscgeeP8aDKoXUlubzj57/+JUc3bjUJeMmcA08=;\r
28         b=NweTFQuaJy9wxaj43QEe/pA0Grixpiv8Pcg28ab/TF8a7M3bxRTQZYgWNbGdzF3Rxg\r
29         zoH7Gj5kE8VGLygvEwtk745b135zz76BgwteCm5ToW3m4zIzBAUDefvBpLsN9o24fvJw\r
30         QK1WcqIP653OIlTB5nRLHNO6ihT19ruuviVGU=\r
31 Received: by 10.204.32.207 with SMTP id e15mr1128218bkd.60.1309376565762;\r
32         Wed, 29 Jun 2011 12:42:45 -0700 (PDT)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id o3sm1437581bka.0.2011.06.29.12.42.44\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Wed, 29 Jun 2011 12:42:45 -0700 (PDT)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH 1/6] test: run emacs inside screen\r
40 Date: Wed, 29 Jun 2011 23:42:33 +0400\r
41 Message-Id: <1309376558-26284-1-git-send-email-dmitry.kurochkin@gmail.com>\r
42 X-Mailer: git-send-email 1.7.5.4\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Wed, 29 Jun 2011 19:42:49 -0000\r
56 \r
57 Before the change, emacs run in daemon mode without any visible\r
58 buffers.  Turns out that this affects emacs behavior in some\r
59 cases.  In particular, `window-end' function returns `point-max'\r
60 instead of the last visible position.  That makes it hard or\r
61 impossible to implement some tests.  The patch runs emacs in a\r
62 detached screen(1) session.  So that it works exactly as if it\r
63 has a visible window.\r
64 \r
65 Note: screen terminates when emacs exits.  So the patch does not\r
66 introduce new "running processes left behind" issues.\r
67 ---\r
68  test/test-lib.sh |   10 ++++++++--\r
69  1 files changed, 8 insertions(+), 2 deletions(-)\r
70 \r
71 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
72 index 079d7db..8d7c98d 100755\r
73 --- a/test/test-lib.sh\r
74 +++ b/test/test-lib.sh\r
75 @@ -873,10 +873,16 @@ EOF\r
76  test_emacs () {\r
77         if [ -z "$EMACS_SERVER" ]; then\r
78                 EMACS_SERVER="notmuch-test-suite-$$"\r
79 -               "$TMP_DIRECTORY/run_emacs" \\r
80 -                       --daemon \\r
81 +               # start a detached screen session with an emacs server\r
82 +               screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \\r
83 +                       --no-window-system \\r
84                         --eval "(setq server-name \"$EMACS_SERVER\")" \\r
85 +                       --eval '(server-start)' \\r
86                         --eval "(orphan-watchdog $$)" || return\r
87 +               # wait until the emacs server is up\r
88 +               until test_emacs '()'; do\r
89 +                       sleep 1\r
90 +               done\r
91         fi\r
92  \r
93         emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"\r
94 -- \r
95 1.7.5.4\r
96 \r