Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 40 / 7d62d9b90d92c7ba10b5717d5e5baad6145d7e
1 Return-Path: <jim@jim.sh>\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 4D00F421192\r
6         for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 13:22:17 -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\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 Es-dWjk74tBi for <notmuch@notmuchmail.org>;\r
16         Wed, 29 Jun 2011 13:22:15 -0700 (PDT)\r
17 X-Greylist: delayed 331 seconds by postgrey-1.32 at olra;\r
18         Wed, 29 Jun 2011 13:22:15 PDT\r
19 Received: from psychosis.jim.sh (jim.sh [75.150.123.25])\r
20         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 046FF42118E\r
23         for <notmuch@notmuchmail.org>; Wed, 29 Jun 2011 13:22:14 -0700 (PDT)\r
24 Received: from psychosis.jim.sh (localhost [127.0.0.1])\r
25         by psychosis.jim.sh (8.14.4/8.14.4/Debian-2) with ESMTP id\r
26         p5TKGfDY019811\r
27         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\r
28         Wed, 29 Jun 2011 16:16:41 -0400\r
29 Received: (from jim@localhost)\r
30         by psychosis.jim.sh (8.14.4/8.14.4/Submit) id p5TKGeGQ019810;\r
31         Wed, 29 Jun 2011 16:16:40 -0400\r
32 Date: Wed, 29 Jun 2011 16:16:40 -0400\r
33 From: Jim Paris <jim@jtan.com>\r
34 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
35 Subject: Re: [PATCH 1/6] test: run emacs inside screen\r
36 Message-ID: <20110629201640.GA19216@psychosis.jim.sh>\r
37 References: <1309376558-26284-1-git-send-email-dmitry.kurochkin@gmail.com>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=us-ascii\r
40 Content-Disposition: inline\r
41 In-Reply-To: <1309376558-26284-1-git-send-email-dmitry.kurochkin@gmail.com>\r
42 Sender: jim@jim.sh\r
43 User-Agent: Mutt/1.5.20 (2009-06-14)\r
44 X-Virus-Scanned: clamav-milter 0.97 at psychosis\r
45 X-Virus-Status: Clean\r
46 Cc: notmuch@notmuchmail.org\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Wed, 29 Jun 2011 20:22:17 -0000\r
60 \r
61 Dmitry Kurochkin wrote:\r
62 > Before the change, emacs run in daemon mode without any visible\r
63 > buffers.  Turns out that this affects emacs behavior in some\r
64 > cases.  In particular, `window-end' function returns `point-max'\r
65 > instead of the last visible position.  That makes it hard or\r
66 > impossible to implement some tests.  The patch runs emacs in a\r
67 > detached screen(1) session.  So that it works exactly as if it\r
68 > has a visible window.\r
69\r
70 > Note: screen terminates when emacs exits.  So the patch does not\r
71 > introduce new "running processes left behind" issues.\r
72 > ---\r
73 >  test/test-lib.sh |   10 ++++++++--\r
74 >  1 files changed, 8 insertions(+), 2 deletions(-)\r
75\r
76 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
77 > index 079d7db..8d7c98d 100755\r
78 > --- a/test/test-lib.sh\r
79 > +++ b/test/test-lib.sh\r
80 > @@ -873,10 +873,16 @@ EOF\r
81 >  test_emacs () {\r
82 >       if [ -z "$EMACS_SERVER" ]; then\r
83 >               EMACS_SERVER="notmuch-test-suite-$$"\r
84 > -             "$TMP_DIRECTORY/run_emacs" \\r
85 > -                     --daemon \\r
86 > +             # start a detached screen session with an emacs server\r
87 > +             screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \\r
88 \r
89 To avoid problems with ~/.screenrc or /etc/screenrc, you might want e.g.\r
90   env SYSSCREENRC=/dev/null SCREENRC=/dev/null screen -S ...\r
91 \r
92 -jim\r
93 \r
94 > +                     --no-window-system \\r
95 >                       --eval "(setq server-name \"$EMACS_SERVER\")" \\r
96 > +                     --eval '(server-start)' \\r
97 >                       --eval "(orphan-watchdog $$)" || return\r
98 > +             # wait until the emacs server is up\r
99 > +             until test_emacs '()'; do\r
100 > +                     sleep 1\r
101 > +             done\r
102 >       fi\r
103 >  \r
104 >       emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"\r
105 > -- \r
106 > 1.7.5.4\r
107\r
108 > _______________________________________________\r
109 > notmuch mailing list\r
110 > notmuch@notmuchmail.org\r
111 > http://notmuchmail.org/mailman/listinfo/notmuch\r