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 16:56:05 -0700 (PDT) Message-ID: <86bcdf0f-6c79-4d20-8eb6-ca0f455fa78e@googlegroups.com> References: <74b79522-cff4-4173-ad1c-178ffdce70fd@googlegroups.com> <91362e27-aad2-4aa8-bfa6-d447881103d1@googlegroups.com> <8f6a541f-2324-4d86-85b0-0472bed4f0a3@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1435968026 12776 80.91.229.3 (4 Jul 2015 00:00:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2015 00:00:26 +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 02:00:18 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 1ZBAsT-0000fV-8K for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 02:00:17 +0200 Original-Received: from localhost ([::1]:42855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBAsS-0006pN-DR for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 20:00:16 -0400 X-Received: by 10.140.232.88 with SMTP id d85mr51386917qhc.0.1435967765257; Fri, 03 Jul 2015 16:56:05 -0700 (PDT) X-Received: by 10.140.35.170 with SMTP id n39mr83052qgn.0.1435967765236; Fri, 03 Jul 2015 16:56:05 -0700 (PDT) Original-Path: usenet.stanford.edu!s91no979426qgd.1!news-out.google.com!w15ni17894qge.0!nntp.google.com!w90no98094qge.0!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 23:56:05 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213129 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:105416 Archived-At: Hi Barry, you might want to read my other responses. Yes it is possible to do what I need. On Friday, 3 July 2015 23:55:29 UTC+1, Barry Margolin wrote: > In article , > Sam Halliday wrote: > > > Aha! It would appear that when emacs is started in -batch mode then the > > program exits when it runs through the initial script. > > > > But my tests are starting up a process, attaching a sentinel and then > > reacting to some triggers in that file. Under non-batch mode, emacs stays > > open until I call `kill-emacs`... but *now* it's dying too early. > > > > So my question then becomes: is there a way to stop emacs -batch from > > terminating when it reaches the end of the script? i.e. require an explicit > > kill-emacs call. > > I don't think so. > > In normal Emacs, when the script finishes, it goes to the main input > loop, which displays the buffer and processes terminal input. That's why > it needs a terminal. > > In batch mode, there's no terminal or redisplay, so there's no main > input loop. It just runs the script and exits. > > Running another process isn't compatible with this mode, because > processing the process output is also part of that main input loop. > > -- > Barry Margolin, barmar@alum.mit.edu > Arlington, MA > *** PLEASE post questions in newsgroups, not directly to me ***