--- /dev/null
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 6FD36429E25\r
+ for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:06:57 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id dZOZV8ysFhC7 for <notmuch@notmuchmail.org>;\r
+ Fri, 11 Nov 2011 13:06:56 -0800 (PST)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+ [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 6DC8F431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:06:56 -0800 (PST)\r
+Received: by bkaq10 with SMTP id q10so4343711bka.26\r
+ for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:06:53 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type;\r
+ bh=yWBTuF14DHaUsLUVRfk8mGXjNHmYVfwVNqEjebs+G10=;\r
+ b=Lam4MNceIjMfOk1RmAOLzgpV1DolIa4JrTNirJpfY0u/lbJMzzyYs7zXb+GvBvG7Bt\r
+ YofGQbCIGkf4ndsAbTY0d2oR9jRy0iexJjDt1aXX2jw4PjlBmSJJdK0Fn4Qr54ESKYHK\r
+ tdu5q34atbRYkbayyOmkZhv5HeWL9tKo1mlqc=\r
+Received: by 10.204.157.154 with SMTP id b26mr2468422bkx.52.1321045613580;\r
+ Fri, 11 Nov 2011 13:06:53 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+ by mx.google.com with ESMTPS id o8sm13224004bkd.3.2011.11.11.13.06.52\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Fri, 11 Nov 2011 13:06:52 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Tomi Ollila <too@iki.fi>,\r
+ Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests\r
+In-Reply-To: <yf64nyae67m.fsf@taco2.nixu.fi>\r
+References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>\r
+ <1320963737-1666-1-git-send-email-jrollins@finestructure.net>\r
+ <yf64nyae67m.fsf@taco2.nixu.fi>\r
+User-Agent: Notmuch/0.9+55~g81c615b (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sat, 12 Nov 2011 01:06:40 +0400\r
+Message-ID: <87fwhu2wtb.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 11 Nov 2011 21:06:57 -0000\r
+\r
+On Fri, 11 Nov 2011 22:48:13 +0200, Tomi Ollila <too@iki.fi> wrote:\r
+> dtach is simpler than screen and is not setuid/setgid program so\r
+> TMPDIR does not get cleared by dynamic loader when executed.\r
+> ---\r
+> \r
+> Updated version after discussion with DmitryKurochkin and amdragon\r
+> on IRC. Thank you.\r
+> \r
+\r
+Looks good to me (though I did not test it).\r
+\r
+Few minor comments below.\r
+\r
+> test/test-lib.sh | 25 +++++++++++++------------\r
+> 1 files changed, 13 insertions(+), 12 deletions(-)\r
+> \r
+> diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> index c81c709..c232130 100755\r
+> --- a/test/test-lib.sh\r
+> +++ b/test/test-lib.sh\r
+> @@ -39,7 +39,7 @@ done,*)\r
+> ;;\r
+> esac\r
+> \r
+> -# Keep the original TERM for say_color\r
+> +# Keep the original TERM for say_color and emacs tests\r
+\r
+s/emacs tests/test_emacs/ for consistency with say_color?\r
+\r
+> ORIGINAL_TERM=$TERM\r
+> \r
+> # For repeatability, reset the environment to known value.\r
+> @@ -843,12 +841,15 @@ EOF\r
+> test_emacs () {\r
+> if [ -z "$EMACS_SERVER" ]; then\r
+> EMACS_SERVER="notmuch-test-suite-$$"\r
+> - # start a detached screen session with an emacs server\r
+> - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \\r
+> - --no-window-system \\r
+> - --eval "(setq server-name \"$EMACS_SERVER\")" \\r
+> - --eval '(server-start)' \\r
+> - --eval "(orphan-watchdog $$)" || return\r
+> + # start a detached session with an emacs server\r
+> + # user's TERM is given to dtach which assumes a minimally\r
+> + # VT100-compatible terminal -- and emacs inherits that\r
+> + TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \\r
+> + sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \\r
+\r
+The above line has a space after two tabs.\r
+\r
+Regards,\r
+ Dmitry\r
+\r
+> + --no-window-system \\r
+> + --eval '(setq server-name \"$EMACS_SERVER\")' \\r
+> + --eval '(server-start)' \\r
+> + --eval '(orphan-watchdog $$)'" || return\r
+> # wait until the emacs server is up\r
+> until test_emacs '()' 2>/dev/null; do\r
+> sleep 1\r
+> -- \r
+> 1.7.6.1\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r