From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: Re: run emacs in batch mode without a tty Date: Fri, 3 Jul 2015 13:43:25 -0700 (PDT) Message-ID: <8f6a541f-2324-4d86-85b0-0472bed4f0a3@googlegroups.com> References: <74b79522-cff4-4173-ad1c-178ffdce70fd@googlegroups.com> <91362e27-aad2-4aa8-bfa6-d447881103d1@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1435956331 11521 80.91.229.3 (3 Jul 2015 20:45:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2015 20:45:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 03 22:45:24 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 1ZB7pl-00023v-P0 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 22:45:17 +0200 Original-Received: from localhost ([::1]:42501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB7pk-0006Ao-K6 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 16:45:16 -0400 X-Received: by 10.66.119.201 with SMTP id kw9mr52379456pab.4.1435956206199; Fri, 03 Jul 2015 13:43:26 -0700 (PDT) X-Received: by 10.140.92.178 with SMTP id b47mr441785qge.13.1435956206153; Fri, 03 Jul 2015 13:43:26 -0700 (PDT) Original-Path: usenet.stanford.edu!ff1no1797537igc.0!news-out.google.com!4ni39590qgh.1!nntp.google.com!s91no913264qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.13.129.22; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 82.13.129.22 User-Agent: G2/1.0 Injection-Date: Fri, 03 Jul 2015 20:43:26 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213121 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:105408 Archived-At: On Friday, 3 July 2015 21:14:36 UTC+1, Eli Zaretskii wrote: > > Date: Fri, 3 Jul 2015 10:07:06 -0700 (PDT) > > From: Sam Halliday > >=20 > > > emacs -batch --eval "(princ \"Hello, world\!\n\")" < /dev/null > fo= o > >=20 > > Aah, the difference is that you're using `-batch` >=20 > Excuse me? It was you who asked specifically about the batch mode: >=20 > > Is it possible to run emacs in batch mode without access to a tty? Is t= here a way to mock a tty for these purposes? > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I wasn't aware that there was a flag to turn emacs into a batch processor. = You can invoke commands and load lisp files for purely automated testing wi= thout the -batch flag, and that is exactly what we are doing. I was calling= that batch mode, but now I don't know what to call it. > > and that does allow me to do *some* things in the docker container, but= emacs seems to just exit when I start a `process`. The docs don't mention = this as a caveat http://www.emacswiki.org/emacs/BatchMode >=20 > What do you mean by "start a process"? I mean start a http://www.gnu.org/software/emacs/manual/html_node/elisp/Pro= cesses.html > > Is there anything that you can think of that might cause a -batch emacs= to exit early? >=20 > How do you see it exiting early? Please provide the details of what > you see, as I have no way of trying this on a system similar to yours. Well, this is literally all the information I have: the stdout http://fommil.com/github.com/ensime/ensime-emacs/drone/ee99fc5d368cafc2dd58= 3520f9fe8e9e23faadb6 from running this script https://github.com/fommil/ensime-emacs/blob/drone/test/run_emacs_tests.sh The last thing we see is the output from this function call (which starts t= he process) https://github.com/fommil/ensime-emacs/blob/drone/ensime-startu= p.el#L215 So I'm interested to know what implication the -batch flag has for the func= tionality of emacs. Specifically: launching/monitoring processes, and navig= ating buffers (i.e. spoofing user actions). Best regards, Sam