Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D481E429E5F for ; Tue, 17 Jan 2012 07:09:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bCooPuEeHjca for ; Tue, 17 Jan 2012 07:09:30 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0C663429E3B for ; Tue, 17 Jan 2012 07:09:29 -0800 (PST) Received: by wibhr12 with SMTP id hr12so3529875wib.26 for ; Tue, 17 Jan 2012 07:09:28 -0800 (PST) Received: by 10.180.24.105 with SMTP id t9mr28882451wif.19.1326812968917; Tue, 17 Jan 2012 07:09:28 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id r1sm17312339wia.8.2012.01.17.07.09.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jan 2012 07:09:27 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id AEF6BA0048; Tue, 17 Jan 2012 15:09:25 +0000 (GMT) To: Dmitry Kurochkin Subject: Re: [PATCH 2/3] test: Add `test_emacs_expect_t'. In-Reply-To: <87zkdmwfi7.fsf@gmail.com> References: <87pqei327k.fsf@gmail.com> <1326809224-22673-1-git-send-email-dme@dme.org> <1326809224-22673-2-git-send-email-dme@dme.org> <87zkdmwfi7.fsf@gmail.com> User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Tue, 17 Jan 2012 15:09:22 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 15:09:31 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 17 Jan 2012 18:49:36 +0400, Dmitry Kurochkin wrote: > > + # We cannot call 'test_emacs' in a subshell, because > > + # the setting of EMACS_SERVER would not persist > > + # throughout a sequence of tests, so we use a > > + # temporary file. > > + tmp=3D"$TMPDIR"; if [ -z "$tmp" ]; then tmp=3D/tmp; fi > > + output=3D"$tmp/test_emacs_output.$$" > > + test_emacs "$1" > "${output}" > > + result=3D$(cat "${output}") > > + rm -f "${output}" >=20 > I wonder if there is any bash trick which can help here? I'm not aware of one, but I'm not a bash expert. > Another option is to start emacs server before using test_emacs in > subshell. See emacs-subject-to-filename for an example. I think this > is a better option than using a temporary file. I think that's a very poor option. Forcing knowledge the breakage into all of the users may make applying any future fix more difficult. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8VjyIACgkQaezQq/BJZRYEmwCfVwugFLMuHzeTU5bw5akCksnX na0AnRzlkYL2sYbSzKg7osfP8/R7FAw6 =N5/B -----END PGP SIGNATURE----- --=-=-=--