[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

checking results of `compile' in batch mode

From: Stephen Leake
Subject: checking results of `compile' in batch mode
Date: Sun, 13 Oct 2013 15:17:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]