From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: run emacs in batch mode without a tty Date: Sat, 04 Jul 2015 10:32:48 +0300 Message-ID: <833814z8bj.fsf@gnu.org> References: <74b79522-cff4-4173-ad1c-178ffdce70fd@googlegroups.com> <83k2uhz6wq.fsf@gnu.org> <86k2ugcsxr.fsf@dod.no> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435995181 11287 80.91.229.3 (4 Jul 2015 07:33:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2015 07:33:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 04 09:32:53 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZBHwT-00045C-4K for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 09:32:53 +0200 Original-Received: from localhost ([::1]:43525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBHwS-0006Lm-I6 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 03:32:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBHwH-0006LW-S0 for help-gnu-emacs@gnu.org; Sat, 04 Jul 2015 03:32:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBHwD-0004aP-Pi for help-gnu-emacs@gnu.org; Sat, 04 Jul 2015 03:32:41 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:36934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBHwD-0004ZO-Gz for help-gnu-emacs@gnu.org; Sat, 04 Jul 2015 03:32:37 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NQY00400CBNQP00@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Sat, 04 Jul 2015 10:32:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQY004MFCYBQW10@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Sat, 04 Jul 2015 10:32:35 +0300 (IDT) In-reply-to: <86k2ugcsxr.fsf@dod.no> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105420 Archived-At: > From: Steinar Bang > Date: Sat, 04 Jul 2015 08:56:00 +0200 > > >>>>> Eli Zaretskii : > > > It does? It doesn't for me: > > > emacs -batch --eval "(princ \"Hello, world\!\n\")" < /dev/null > foo > > > I get no crash and the expected message in the file 'foo'. > > >From the example above, how do you know that emacs doesn't require a tty > as seen from the startup shell, just to start up and run in batch? The original message talked about crashes. It's easy to know I don't get that ;-) As for what you ask, I don't understand the question. What do you mean by "a tty as seen from the startup shell", and why is that relevant? Once Emacs is invoked, why should it care about the shell that invoked it? > (It's a real question, not a rethorical one. I'm curious. I guess the > tty requirement might differ, depending on the OS? Different for > GNU/linux (and other unixoid systems) and Win32?) They might, but (a) I tried my example both on GNU/Linux and on MS-Windows, and (b) I explicitly asked for evidence that a tty device needs to exist for Emacs to start in batch mode, because if such a precondition exists, it must be a bug of some kind. Meanwhile, the OP says that "emacs -batch" works on their system, which apparently lacks a tty device, and that is yet another evidence that a tty device is not needed in batch mode, as I'd expect.