* checking results of `compile' in batch mode
@ 2013-10-13 20:17 Stephen Leake
0 siblings, 0 replies; only message in thread
From: Stephen Leake @ 2013-10-13 20:17 UTC (permalink / raw)
To: emacs-devel
I'm trying to run a test of an Ada mode function that invokes
`compilation-start'. The process started runs a cross reference tool;
the expected result is a list of locations, recognized by an entry in
compilation-error-regexp-alist.
The test invokes the top level Ada mode function, sleeps a bit to let
the cross reference tool run, then invokes `next-error' to pop to the
expected location, and checks the location using `looking-at'.
This works fine in interactive mode, but fails in batch mode.
I've added a debug dump of the "*compilation*" buffer to the test, and
the output of the background process is not appearing in that buffer.
Even when I add a verbosity option to the background process command,
nothing shows up in the ""*compilation*" buffer after the echo of the
command line inserted directly by `compilation-start'.
Is there something in the compilation-start mechanism that inhibits
background process output in batch mode? I'm looking thru the code in
compile.el, but I don't see any mention of this effect.
Hmm. I just realized the *compilation* buffer also doesn't have the
normal "Compilation finished at ..." message. So maybe the background process
is not running, despite the `sleep-for'? The sleep-for does delay the
foreground emacs (it takes longer to exit when I increase it), so why
would the background process not run?
I found a work-around; (fmakeunbound 'start-process). This causes
`compilation-start' to call the cross reference tool synchronously; now
the tool output appears in the *compilation* buffer (the test still
fails, but that's another problem). This also means I can delete the
'sleep-for, and I don't have to guess at how long to wait for the
results. So this may be a good thing to keep in the batch mode test.
So I can move forward, but I'd like to understand what's going on with
the background process in batch mode.
--
-- Stephe
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-13 20:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-13 20:17 checking results of `compile' in batch mode Stephen Leake
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.