389 |
first and the output replaces it as the contents of the region. It |
first and the output replaces it as the contents of the region. It |
390 |
returns the command's exit status when it is called from a Lisp program. |
returns the command's exit status when it is called from a Lisp program. |
391 |
|
|
392 |
One use for @kbd{M-|} is to run @code{uudecode}. For instance, if |
One use for @kbd{M-|} is to run @code{gpg} to see what keys are in |
393 |
the buffer contains uuencoded text, type @kbd{C-x h M-| uudecode |
the buffer. For instance, if the buffer contains a GPG key, type |
394 |
@key{RET}} to feed the entire buffer contents to the @code{uudecode} |
@kbd{C-x h M-| uudecode @key{RET}} to feed the entire buffer contents |
395 |
program. That program will ignore everything except the encoded text, |
to the @code{gpg} program. That program will ignore everything except |
396 |
and will store the decoded output into the file whose name is |
the encoded keys, and will output a list of the keys it contains. |
|
specified in the encoded text. |
|
397 |
|
|
398 |
@vindex shell-file-name |
@vindex shell-file-name |
399 |
Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the |
Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the |
404 |
@env{PATH} when Emacs is started. Your @file{.emacs} file can override |
@env{PATH} when Emacs is started. Your @file{.emacs} file can override |
405 |
either or both of these default initializations.@refill |
either or both of these default initializations.@refill |
406 |
|
|
407 |
Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete. |
Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, |
408 |
To stop waiting, type @kbd{C-g} to quit; that terminates the shell |
unless you end the command with @samp{&} to make it asyncronous. To |
409 |
|
stop waiting, type @kbd{C-g} to quit; that terminates the shell |
410 |
command with the signal @code{SIGINT}---the same signal that @kbd{C-c} |
command with the signal @code{SIGINT}---the same signal that @kbd{C-c} |
411 |
normally generates in the shell. Emacs waits until the command actually |
normally generates in the shell. Emacs waits until the command |
412 |
terminates. If the shell command doesn't stop (because it ignores the |
actually terminates. If the shell command doesn't stop (because it |
413 |
@code{SIGINT} signal), type @kbd{C-g} again; this sends the command a |
ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends |
414 |
@code{SIGKILL} signal which is impossible to ignore. |
the command a @code{SIGKILL} signal which is impossible to ignore. |
415 |
|
|
416 |
|
Asynchronous commands ending in @samp{&} feed their output into |
417 |
|
the buffer @samp{*Async Shell Command*}. Output arrives in that |
418 |
|
buffer regardless of whether it is visible in a window. |
419 |
|
|
420 |
To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command |
To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command |
421 |
@kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}. |
@kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}. |
708 |
@subsection Shell Command History |
@subsection Shell Command History |
709 |
|
|
710 |
Shell buffers support three ways of repeating earlier commands. You |
Shell buffers support three ways of repeating earlier commands. You |
711 |
can use the same keys used in the minibuffer; these work much as they do |
can use keys like those used for the minibuffer history; these work |
712 |
in the minibuffer, inserting text from prior commands while point |
much as they do in the minibuffer, inserting text from prior commands |
713 |
remains always at the end of the buffer. You can move through the |
while point remains always at the end of the buffer. You can move |
714 |
buffer to previous inputs in their original place, then resubmit them or |
through the buffer to previous inputs in their original place, then |
715 |
copy them to the end. Or you can use a @samp{!}-style history |
resubmit them or copy them to the end. Or you can use a |
716 |
reference. |
@samp{!}-style history reference. |
717 |
|
|
718 |
@menu |
@menu |
719 |
* Ring: Shell Ring. Fetching commands from the history list. |
* Ring: Shell Ring. Fetching commands from the history list. |
728 |
@findex comint-previous-input |
@findex comint-previous-input |
729 |
@kindex M-p @r{(Shell mode)} |
@kindex M-p @r{(Shell mode)} |
730 |
@item M-p |
@item M-p |
731 |
|
@itemx C-@key{UP} |
732 |
Fetch the next earlier old shell command. |
Fetch the next earlier old shell command. |
733 |
|
|
734 |
@kindex M-n @r{(Shell mode)} |
@kindex M-n @r{(Shell mode)} |
735 |
@findex comint-next-input |
@findex comint-next-input |
736 |
@item M-n |
@item M-n |
737 |
|
@itemx C-@key{DOWN} |
738 |
Fetch the next later old shell command. |
Fetch the next later old shell command. |
739 |
|
|
740 |
@kindex M-r @r{(Shell mode)} |
@kindex M-r @r{(Shell mode)} |
768 |
history commands except that they operate on the text at the end of the |
history commands except that they operate on the text at the end of the |
769 |
shell buffer, where you would normally insert text to send to the shell. |
shell buffer, where you would normally insert text to send to the shell. |
770 |
|
|
771 |
@kbd{M-p} fetches an earlier shell command to the end of the shell buffer. |
@kbd{M-p} fetches an earlier shell command to the end of the shell |
772 |
Successive use of @kbd{M-p} fetches successively earlier shell commands, |
buffer. Successive use of @kbd{M-p} fetches successively earlier |
773 |
each replacing any text that was already present as potential shell input. |
shell commands, each replacing any text that was already present as |
774 |
@kbd{M-n} does likewise except that it finds successively more recent shell |
potential shell input. @kbd{M-n} does likewise except that it finds |
775 |
commands from the buffer. |
successively more recent shell commands from the buffer. |
776 |
|
@kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like |
777 |
|
@kbd{M-n}. |
778 |
|
|
779 |
The history search commands @kbd{M-r} and @kbd{M-s} read a regular |
The history search commands @kbd{M-r} and @kbd{M-s} read a regular |
780 |
expression and search through the history for a matching command. Aside |
expression and search through the history for a matching command. Aside |
956 |
show the current buffer. The default value is @code{nil}, which means |
show the current buffer. The default value is @code{nil}, which means |
957 |
point does not jump to the end. |
point does not jump to the end. |
958 |
|
|
959 |
|
@vindex comint-prompt-read-only |
960 |
|
If you set @code{comint-prompt-read-only}, the prompts in the Comint |
961 |
|
buffer a read-only. |
962 |
|
|
963 |
@vindex comint-input-ignoredups |
@vindex comint-input-ignoredups |
964 |
The variable @code{comint-input-ignoredups} controls whether successive |
The variable @code{comint-input-ignoredups} controls whether successive |
965 |
identical inputs are stored in the input history. A non-@code{nil} |
identical inputs are stored in the input history. A non-@code{nil} |
1309 |
running @code{emacsclient} in a script. It specifies a command to run |
running @code{emacsclient} in a script. It specifies a command to run |
1310 |
if @code{emacsclient} fails to contact Emacs. For example, the |
if @code{emacsclient} fails to contact Emacs. For example, the |
1311 |
following setting for the @var{EDITOR} environment variable will |
following setting for the @var{EDITOR} environment variable will |
1312 |
always give an editor, even if Emacs is not running: |
always give you an editor, even if no Emacs server is running: |
1313 |
|
|
1314 |
@example |
@example |
1315 |
EDITOR="emacsclient --alternate-editor vi +%d %s" |
EDITOR="emacsclient --alternate-editor emacs +%d %s" |
1316 |
@end example |
@end example |
1317 |
|
|
1318 |
@noindent |
@noindent |
1549 |
@cindex sorting |
@cindex sorting |
1550 |
|
|
1551 |
Emacs provides several commands for sorting text in the buffer. All |
Emacs provides several commands for sorting text in the buffer. All |
1552 |
operate on the contents of the region (the text between point and the |
operate on the contents of the region. |
1553 |
mark). They divide the text of the region into many @dfn{sort records}, |
They divide the text of the region into many @dfn{sort records}, |
1554 |
identify a @dfn{sort key} for each record, and then reorder the records |
identify a @dfn{sort key} for each record, and then reorder the records |
1555 |
into the order determined by the sort keys. The records are ordered so |
into the order determined by the sort keys. The records are ordered so |
1556 |
that their keys are in alphabetical order, or, for numeric sorting, in |
that their keys are in alphabetical order, or, for numeric sorting, in |
1907 |
@findex desktop-save |
@findex desktop-save |
1908 |
@vindex desktop-save-mode |
@vindex desktop-save-mode |
1909 |
You can save the desktop manually with the command @kbd{M-x |
You can save the desktop manually with the command @kbd{M-x |
1910 |
desktop-save}. You can also enable automatical desktop saving when |
desktop-save}. You can also enable automatic desktop saving when |
1911 |
you exit Emacs: use the Customization buffer (@pxref{Easy |
you exit Emacs: use the Customization buffer (@pxref{Easy |
1912 |
Customization}) to set @code{desktop-save-mode} to @code{t} for future |
Customization}) to set @code{desktop-save-mode} to @code{t} for future |
1913 |
sessions, or add this line in your @file{~/.emacs} file: |
sessions, or add this line in your @file{~/.emacs} file: |
1974 |
Mode lines display a pair of square brackets for each recursive editing |
Mode lines display a pair of square brackets for each recursive editing |
1975 |
level currently in progress. |
level currently in progress. |
1976 |
|
|
1977 |
Exiting the inner recursive edit (such as, with the debugger @kbd{c} |
Exiting the inner recursive edit (such as with the debugger @kbd{c} |
1978 |
command) resumes the command running in the next level up. When that |
command) resumes the command running in the next level up. When that |
1979 |
command finishes, you can then use @kbd{C-M-c} to exit another recursive |
command finishes, you can then use @kbd{C-M-c} to exit another recursive |
1980 |
editing level, and so on. Exiting applies to the innermost level only. |
editing level, and so on. Exiting applies to the innermost level only. |
2053 |
@cindex ``PC'' key bindings |
@cindex ``PC'' key bindings |
2054 |
The command @kbd{M-x pc-bindings-mode} sets up certain key bindings |
The command @kbd{M-x pc-bindings-mode} sets up certain key bindings |
2055 |
for ``PC compatibility''---what people are often used to on PCs---as |
for ``PC compatibility''---what people are often used to on PCs---as |
2056 |
follows: @kbd{Delete} and its variants delete forward instead of |
follows: @kbd{M-Backspace} does undo, @kbd{Home} and @kbd{End} |
2057 |
backward, @kbd{C-Backspace} kills backward a word (as @kbd{C-Delete} |
move to beginning and end of line, and @kbd{C-Escape} does |
|
normally would), @kbd{M-Backspace} does undo, @kbd{Home} and @kbd{End} |
|
|
move to beginning and end of line, @kbd{C-Home} and @kbd{C-End} move |
|
|
to beginning and end of buffer and @kbd{C-Escape} does |
|
2058 |
@code{list-buffers}. |
@code{list-buffers}. |
2059 |
|
|
2060 |
@item PC Selection mode |
@item PC Selection mode |
2141 |
@cindex navigation |
@cindex navigation |
2142 |
Various modes documented elsewhere have hypertext features so that |
Various modes documented elsewhere have hypertext features so that |
2143 |
you can follow links, usually by clicking @kbd{Mouse-2} on the link or |
you can follow links, usually by clicking @kbd{Mouse-2} on the link or |
2144 |
typing @key{RET} while point is on the link. Info mode, Help mode and |
typing @key{RET} while point is on the link. Clicking @kbd{Mouse-1} |
2145 |
the Dired-like modes are examples. The Tags facility links between |
quickly on the link also follows it. (Hold @kbd{Mouse-1} for longer |
2146 |
uses and definitions in source files, see @ref{Tags}. Imenu provides |
if you want to set point instead.) |
2147 |
|
|
2148 |
|
Info mode, Help mode and the Dired-like modes are examples of modes |
2149 |
|
that have links in the buffer. The Tags facility links between uses |
2150 |
|
and definitions in source files, see @ref{Tags}. Imenu provides |
2151 |
navigation amongst items indexed in the current buffer, see |
navigation amongst items indexed in the current buffer, see |
2152 |
@ref{Imenu}. Info-lookup provides mode-specific lookup of definitions |
@ref{Imenu}. Info-lookup provides mode-specific lookup of definitions |
2153 |
in Info indexes, see @ref{Documentation}. Speedbar maintains a frame |
in Info indexes, see @ref{Documentation}. Speedbar maintains a frame |
2162 |
* Browse-URL:: Following URLs. |
* Browse-URL:: Following URLs. |
2163 |
* Goto-address:: Activating URLs. |
* Goto-address:: Activating URLs. |
2164 |
* FFAP:: Finding files etc. at point. |
* FFAP:: Finding files etc. at point. |
|
* Find-func:: Finding function and variable definitions. |
|
2165 |
@end menu |
@end menu |
2166 |
|
|
2167 |
@node Browse-URL |
@node Browse-URL |
2300 |
find the one you select (@code{ffap-menu}). |
find the one you select (@code{ffap-menu}). |
2301 |
@end table |
@end table |
2302 |
|
|
|
@node Find-func |
|
|
@subsection Finding Function and Variable Definitions |
|
|
@cindex definitions, finding in Lisp sources |
|
|
@cindex Lisp definitions, finding in sources |
|
|
|
|
|
@table @kbd |
|
|
@item M-x find-function @key{RET} @var{function} @key{RET} |
|
|
Find the definition of @var{function} in its source file. |
|
|
@item M-x find-variable @key{RET} @var{variable} @key{RET} |
|
|
Find the definition of @var{variable} in its source file. |
|
|
@item M-x find-function-on-key @key{RET} @var{key} |
|
|
Find the definition of the function that @var{key} invokes. |
|
|
@end table |
|
|
|
|
|
These commands provide an easy way to find the definitions of Emacs |
|
|
Lisp functions and variables. They are similar in purpose to the Tags |
|
|
facility (@pxref{Tags}), but don't require a tags table; on the other |
|
|
hand, they only work for function and variable definitions that are |
|
|
already loaded in the Emacs session. |
|
|
|
|
|
@findex find-function |
|
|
@findex find-function-on-key |
|
|
@findex find-variable |
|
|
To find the definition of a function, use @kbd{M-x find-function}. |
|
|
@kbd{M-x find-variable} finds the definition of a specified variable. |
|
|
@kbd{M-x find-function-on-key} finds the definition of the function |
|
|
bound to a specified key. |
|
|
|
|
|
To use these commands, you must have the Lisp source (@samp{.el}) |
|
|
files available along with the compiled (@samp{.elc}) files, in |
|
|
directories in @code{load-path}. You can use compressed source files |
|
|
if you enable Auto Compression mode. These commands only handle |
|
|
definitions written in Lisp, not primitive functions or variables |
|
|
defined in the C code of Emacs. |
|
|
|
|
2303 |
@node Dissociated Press, Amusements, Hyperlinking, Top |
@node Dissociated Press, Amusements, Hyperlinking, Top |
2304 |
@section Dissociated Press |
@section Dissociated Press |
2305 |
|
|