aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-03-21 18:06:58 +0000
committerRichard M. Stallman2005-03-21 18:06:58 +0000
commited4389afef9cb843411eb4b56b5d2fefca10cfac (patch)
tree3d596fa295cf730b1bfcf6b35d6ea2d31ed3a809
parent33e54c8713eee7a5dcada98f6a526ddf31aeb593 (diff)
downloademacs-ed4389afef9cb843411eb4b56b5d2fefca10cfac.tar.gz
emacs-ed4389afef9cb843411eb4b56b5d2fefca10cfac.zip
(Starting GUD): Add bashdb.
(Building): Put Grep Searching after Compilation Shell. (Compilation Mode): Document M-n, M-p, M-}, M-{, and C-c C-f bindings. Document next-error-highlight. (Grep Searching): Document grep-highlight-matches. (Lisp Eval): Typing C-x C-e twice prints integers specially.
-rw-r--r--man/building.texi122
1 files changed, 85 insertions, 37 deletions
diff --git a/man/building.texi b/man/building.texi
index 8d0caaae281..3e90144925d 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -14,10 +14,10 @@ in the larger process of developing and maintaining programs.
14@menu 14@menu
15* Compilation:: Compiling programs in languages other 15* Compilation:: Compiling programs in languages other
16 than Lisp (C, Pascal, etc.). 16 than Lisp (C, Pascal, etc.).
17* Grep Searching:: Running grep as if it were a compiler.
18* Compilation Mode:: The mode for visiting compiler errors. 17* Compilation Mode:: The mode for visiting compiler errors.
19* Compilation Shell:: Customizing your shell properly 18* Compilation Shell:: Customizing your shell properly
20 for use in the compilation buffer. 19 for use in the compilation buffer.
20* Grep Searching:: Searching with grep.
21* Debuggers:: Running symbolic debuggers for non-Lisp programs. 21* Debuggers:: Running symbolic debuggers for non-Lisp programs.
22* Executing Lisp:: Various modes for editing Lisp programs, 22* Executing Lisp:: Various modes for editing Lisp programs,
23 with different facilities for running 23 with different facilities for running
@@ -147,36 +147,6 @@ of environment variable settings; each element should be a string of
147the form @code{"@var{envvarname}=@var{value}"}. These environment 147the form @code{"@var{envvarname}=@var{value}"}. These environment
148variable settings override the usual ones. 148variable settings override the usual ones.
149 149
150@node Grep Searching
151@section Searching with Grep under Emacs
152
153@findex grep
154 Just as you can run a compiler from Emacs and then visit the lines
155where there were compilation errors, you can also run @code{grep} and
156then visit the lines on which matches were found. This works by
157treating the matches reported by @code{grep} as if they were ``errors.''
158
159 To do this, type @kbd{M-x grep}, then enter a command line that
160specifies how to run @code{grep}. Use the same arguments you would give
161@code{grep} when running it normally: a @code{grep}-style regexp
162(usually in single-quotes to quote the shell's special characters)
163followed by file names, which may use wildcards. The output from
164@code{grep} goes in the @samp{*grep*} buffer. You can find the
165corresponding lines in the original files using @kbd{C-x `} and
166@key{RET}, as with compilation errors.
167
168 If you specify a prefix argument for @kbd{M-x grep}, it figures out
169the tag (@pxref{Tags}) around point, and puts that into the default
170@code{grep} command.
171
172@findex grep-find
173@findex find-grep
174 The command @kbd{M-x grep-find} (also available as @kbd{M-x
175find-grep}) is similar to @kbd{M-x grep}, but it supplies a different
176initial default for the command---one that runs both @code{find} and
177@code{grep}, so as to search every file in a directory tree. See also
178the @code{find-grep-dired} command, in @ref{Dired and Find}.
179
180@node Compilation Mode 150@node Compilation Mode
181@section Compilation Mode 151@section Compilation Mode
182 152
@@ -199,6 +169,21 @@ Visit the locus of the error message that point is on.
199This command is used in the compilation buffer. 169This command is used in the compilation buffer.
200@item Mouse-2 170@item Mouse-2
201Visit the locus of the error message that you click on. 171Visit the locus of the error message that you click on.
172@item M-n
173Find and highlight the locus of the next error message, without
174selecting the source buffer.
175@item M-p
176Find and highlight the locus of the previous error message, without
177selecting the source buffer.
178@item M-@}
179Move point to the next error for a different file than the current
180one.
181@item M-@{
182Move point to the previous error for a different file than the current
183one.
184@item C-c C-f
185Toggle Next Error Follow minor mode, which makes cursor motion in the
186compilation buffer produce automatic source display.
202@end table 187@end table
203 188
204@kindex C-x ` 189@kindex C-x `
@@ -209,12 +194,15 @@ typing @key{RET} (@code{compile-goto-error}). Alternatively, you can
209click @kbd{Mouse-2} on the error message; you need not switch to the 194click @kbd{Mouse-2} on the error message; you need not switch to the
210@samp{*compilation*} buffer first. 195@samp{*compilation*} buffer first.
211 196
197@vindex next-error-highlight
212 To parse the compiler error messages sequentially, type @kbd{C-x `} 198 To parse the compiler error messages sequentially, type @kbd{C-x `}
213(@code{next-error}). The character following the @kbd{C-x} is the 199(@code{next-error}). The character following the @kbd{C-x} is the
214backquote or ``grave accent,'' not the single-quote. This command is 200backquote or ``grave accent,'' not the single-quote. This command is
215available in all buffers, not just in @samp{*compilation*}; it displays 201available in all buffers, not just in @samp{*compilation*}; it
216the next error message at the top of one window and source location of 202displays the next error message at the top of one window and source
217the error in another window. 203location of the error in another window. It also momentarily
204highlights the relevant source line. You can change the behavior of
205this highlighting with the variable @code{next-error-highlight}.
218 206
219 The first time @kbd{C-x `} is used after the start of a compilation, 207 The first time @kbd{C-x `} is used after the start of a compilation,
220it moves to the first error's location. Subsequent uses of @kbd{C-x `} 208it moves to the first error's location. Subsequent uses of @kbd{C-x `}
@@ -245,10 +233,25 @@ supported, you can tailor Compilation mode to it by adding elements to
245that list. A similar variable @code{grep-regexp-alist} tells Emacs how 233that list. A similar variable @code{grep-regexp-alist} tells Emacs how
246to parse output of a @code{grep} command. 234to parse output of a @code{grep} command.
247 235
236@findex compilation-next-error
237@findex compilation-previous-error
238@findex compilation-next-file
239@findex compilation-previous-file
248 Compilation mode also redefines the keys @key{SPC} and @key{DEL} to 240 Compilation mode also redefines the keys @key{SPC} and @key{DEL} to
249scroll by screenfuls, and @kbd{M-n} and @kbd{M-p} to move to the next or 241scroll by screenfuls, and @kbd{M-n} (@code{compilation-next-error})
250previous error message. You can also use @kbd{M-@{} and @kbd{M-@}} to 242and @kbd{M-p} (@code{compilation-previous-error}) to move to the next
251move up or down to an error message for a different source file. 243or previous error message. You can also use @kbd{M-@{}
244(@code{compilation-next-file} and @kbd{M-@}}
245(@code{compilation-previous-file}) to move up or down to an error
246message for a different source file.
247
248@cindex Next Error Follow mode
249@findex next-error-follow-minor-mode
250 You can type @kbd{C-c C-f} to toggle Next Error Follow mode. In
251this minor mode, ordinary cursor motion in the compilation buffer
252automatically updates the source buffer. For instance, moving the
253cursor to the next error message causes the location of that error to
254be displayed immediately.
252 255
253 The features of Compilation mode are also available in a minor mode 256 The features of Compilation mode are also available in a minor mode
254called Compilation Minor mode. This lets you parse error messages in 257called Compilation Minor mode. This lets you parse error messages in
@@ -298,6 +301,42 @@ compilation command synchronously on MS-DOS. As a consequence, you must
298wait until the command finishes before you can do anything else in 301wait until the command finishes before you can do anything else in
299Emacs. @xref{MS-DOS}. 302Emacs. @xref{MS-DOS}.
300 303
304@node Grep Searching
305@section Searching with Grep under Emacs
306
307@findex grep
308 Just as you can run a compiler from Emacs and then visit the lines
309where there were compilation errors, you can also run @code{grep} and
310then visit the lines on which matches were found. This works by
311treating the matches reported by @code{grep} as if they were ``errors.''
312
313 To do this, type @kbd{M-x grep}, then enter a command line that
314specifies how to run @code{grep}. Use the same arguments you would give
315@code{grep} when running it normally: a @code{grep}-style regexp
316(usually in single-quotes to quote the shell's special characters)
317followed by file names, which may use wildcards. If you specify a
318prefix argument for @kbd{M-x grep}, it figures out the tag
319(@pxref{Tags}) around point, and puts that into the default
320@code{grep} command.
321
322 The output from @code{grep} goes in the @samp{*grep*} buffer. You
323can find the corresponding lines in the original files using @kbd{C-x
324`}, @key{RET}, and so forth, just like compilation errors.
325
326 Some grep programs accept a @samp{--color} option to output special
327markers around matches for the purpose of highlighting. You can make
328use of this feature by setting @code{grep-highlight-matches} to t.
329When displaying a match in the source buffer, the exact match will be
330highlighted, instead of the entire source line.
331
332@findex grep-find
333@findex find-grep
334 The command @kbd{M-x grep-find} (also available as @kbd{M-x
335find-grep}) is similar to @kbd{M-x grep}, but it supplies a different
336initial default for the command---one that runs both @code{find} and
337@code{grep}, so as to search every file in a directory tree. See also
338the @code{find-grep-dired} command, in @ref{Dired and Find}.
339
301@node Debuggers 340@node Debuggers
302@section Running Debuggers Under Emacs 341@section Running Debuggers Under Emacs
303@cindex debuggers 342@cindex debuggers
@@ -307,6 +346,7 @@ Emacs. @xref{MS-DOS}.
307@cindex SDB 346@cindex SDB
308@cindex XDB 347@cindex XDB
309@cindex Perldb 348@cindex Perldb
349@cindex bashdb
310@cindex JDB 350@cindex JDB
311@cindex PDB 351@cindex PDB
312 352
@@ -366,6 +406,10 @@ of the functions, you get a message saying @samp{The sdb support
366requires a valid tags table to work}. If this happens, generate a valid 406requires a valid tags table to work}. If this happens, generate a valid
367tags table in the working directory and try again. 407tags table in the working directory and try again.
368 408
409@item M-x bashdb @key{RET} @var{file} @key{RET}
410@findex bashdb
411Run the bash debugger to debug @var{file}, a shell script.
412
369@item M-x perldb @key{RET} @var{file} @key{RET} 413@item M-x perldb @key{RET} @var{file} @key{RET}
370@findex perldb 414@findex perldb
371Run the Perl interpreter in debug mode to debug @var{file}, a Perl program. 415Run the Perl interpreter in debug mode to debug @var{file}, a Perl program.
@@ -1046,6 +1090,10 @@ expression preceding point in the buffer, and displays the value in the
1046echo area. It is available in all major modes, not just Emacs-Lisp 1090echo area. It is available in all major modes, not just Emacs-Lisp
1047mode. It does not treat @code{defvar} specially. 1091mode. It does not treat @code{defvar} specially.
1048 1092
1093 When the result of an evaluation is an integer, you can type
1094@kbd{C-x C-e} a second time to display the value of the integer result
1095in additional formats (octal, hexadecimal, and character).
1096
1049 If @kbd{C-M-x}, @kbd{C-x C-e}, or @kbd{M-:} is given a numeric 1097 If @kbd{C-M-x}, @kbd{C-x C-e}, or @kbd{M-:} is given a numeric
1050argument, it inserts the value into the current buffer at point, rather 1098argument, it inserts the value into the current buffer at point, rather
1051than displaying it in the echo area. The argument's value does not 1099than displaying it in the echo area. The argument's value does not