[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run emacs in batch mode without a tty
From: |
Sam Halliday |
Subject: |
Re: run emacs in batch mode without a tty |
Date: |
Fri, 3 Jul 2015 14:25:08 -0700 (PDT) |
User-agent: |
G2/1.0 |
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.
On Friday, 3 July 2015 21:43:27 UTC+1, Sam Halliday wrote:
> 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 <sam.halliday@gmail.com>
> > >
> > > > emacs -batch --eval "(princ \"Hello, world\!\n\")" < /dev/null > foo
> > >
> > > Aah, the difference is that you're using `-batch`
> >
> > Excuse me? It was you who asked specifically about the batch mode:
> >
> > > Is it possible to run emacs in batch mode without access to a tty? Is
> > > there 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
> without 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
> >
> > What do you mean by "start a process"?
>
> I mean start a
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Processes.html
>
> > > Is there anything that you can think of that might cause a -batch emacs
> > > to exit early?
> >
> > 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/ee99fc5d368cafc2dd583520f9fe8e9e23faadb6
>
> 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 the
> process)
> https://github.com/fommil/ensime-emacs/blob/drone/ensime-startup.el#L215
>
> So I'm interested to know what implication the -batch flag has for the
> functionality of emacs. Specifically: launching/monitoring processes, and
> navigating buffers (i.e. spoofing user actions).
>
> Best regards,
> Sam
- Re: run emacs in batch mode without a tty, (continued)
- Message not available
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/03
- Message not available
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/03
- Message not available
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty,
Sam Halliday <=
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/04
- Re: run emacs in batch mode without a tty, Barry Margolin, 2015/07/03
- Re: run emacs in batch mode without a tty, Sam Halliday, 2015/07/03
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/04
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/04
- Re: run emacs in batch mode without a tty, Eli Zaretskii, 2015/07/04