102 |
follow output as it comes in. |
follow output as it comes in. |
103 |
|
|
104 |
@findex kill-compilation |
@findex kill-compilation |
105 |
To kill the compilation process, do @kbd{M-x kill-compilation}. When |
When the compiler process terminates, for whatever reason, the mode |
106 |
the compiler process terminates, the mode line of the |
line of the @samp{*compilation*} buffer changes to say @samp{signal} |
107 |
@samp{*compilation*} buffer changes to say @samp{signal} instead of |
instead of @samp{run}. Starting a new compilation also kills any |
108 |
@samp{run}. Starting a new compilation also kills any running |
running compilation, as only one can exist at any time. However, |
109 |
compilation, as only one can exist at any time. However, @kbd{M-x |
@kbd{M-x compile} asks for confirmation before actually killing a |
110 |
compile} asks for confirmation before actually killing a compilation |
compilation that is running. You can also kill the compilation |
111 |
that is running. |
process with @kbd{M-x kill-compilation}. |
112 |
|
|
113 |
@findex recompile |
@findex recompile |
114 |
To rerun the last compilation with the same command, type @kbd{M-x |
To rerun the last compilation with the same command, type @kbd{M-x |
115 |
recompile}. This automatically reuses the compilation command from the |
recompile}. This automatically reuses the compilation command from the |
116 |
last invocation of @kbd{M-x compile}. |
last invocation of @kbd{M-x compile}. |
117 |
|
|
118 |
Emacs does not expect a compiler to launch asynchronous |
Emacs does not expect a compiler process to launch asynchronous |
119 |
subprocesses; if it does, and they keep running after the main |
subprocesses; if it does, and they keep running after the main |
120 |
compiler process has terminated, their output may not arrive in Emacs. |
compiler process has terminated, Emacs may kill them or their output |
121 |
|
may not arrive in Emacs. To avoid this problem, make the main process |
122 |
|
wait for its subprocesses to finish. In a shell script, you can do this |
123 |
|
using @samp{$!} and @samp{wait}, like this: |
124 |
|
|
125 |
|
@example |
126 |
|
(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess} |
127 |
|
echo first message |
128 |
|
wait $pid # @r{Wait for subprocess} |
129 |
|
@end example |
130 |
|
|
131 |
@node Grep Searching |
@node Grep Searching |
132 |
@section Searching with Grep under Emacs |
@section Searching with Grep under Emacs |