diff options
| author | Richard M. Stallman | 2005-03-06 17:30:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-03-06 17:30:23 +0000 |
| commit | 982dcb1ba15886db91eb2a884d71a0d69f38833d (patch) | |
| tree | 89969db1e39fca26d9c6d5d8d00655193a365647 | |
| parent | eda8cfcfd9679223fe32f0f37ffd17d21e5e80b3 (diff) | |
| download | emacs-982dcb1ba15886db91eb2a884d71a0d69f38833d.tar.gz emacs-982dcb1ba15886db91eb2a884d71a0d69f38833d.zip | |
(Single Shell): Replace uudecode example with gpg example.
Document async shell commands.
(Shell History): Clarify.
(Shell Ring): Mention C-UP an C-DOWN.
(Shell Options): Add comint-prompt-read-only.
(Invoking emacsclient): Set EDITOR to run Emacs.
(Sorting): No need to explain what region is.
(Saving Emacs Sessions): Fix typo.
(Recursive Edit): Fix punctuation.
(Emulation): Don't mention "PC bindings" which are standard.
(Hyperlinking): Explain Mouse-1 convention here.
(Find Func): Node deleted.
| -rw-r--r-- | man/misc.texi | 123 |
1 files changed, 50 insertions, 73 deletions
diff --git a/man/misc.texi b/man/misc.texi index 8068de4c25f..3bf1eb47770 100644 --- a/man/misc.texi +++ b/man/misc.texi | |||
| @@ -389,12 +389,11 @@ insert the output in the current buffer, then the old region is deleted | |||
| 389 | first and the output replaces it as the contents of the region. It | 389 | 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. | 390 | returns the command's exit status when it is called from a Lisp program. |
| 391 | 391 | ||
| 392 | One use for @kbd{M-|} is to run @code{uudecode}. For instance, if | 392 | 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 | 393 | 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} | 394 | @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, | 395 | to the @code{gpg} program. That program will ignore everything except |
| 396 | and will store the decoded output into the file whose name is | 396 | the encoded keys, and will output a list of the keys it contains. |
| 397 | specified in the encoded text. | ||
| 398 | 397 | ||
| 399 | @vindex shell-file-name | 398 | @vindex shell-file-name |
| 400 | Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the | 399 | Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the |
| @@ -405,13 +404,18 @@ searched; this list is initialized based on the environment variable | |||
| 405 | @env{PATH} when Emacs is started. Your @file{.emacs} file can override | 404 | @env{PATH} when Emacs is started. Your @file{.emacs} file can override |
| 406 | either or both of these default initializations.@refill | 405 | either or both of these default initializations.@refill |
| 407 | 406 | ||
| 408 | Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete. | 407 | Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, |
| 409 | To stop waiting, type @kbd{C-g} to quit; that terminates the shell | 408 | 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} | 410 | 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 | 411 | normally generates in the shell. Emacs waits until the command |
| 412 | terminates. If the shell command doesn't stop (because it ignores the | 412 | 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 | 413 | ignores the @code{SIGINT} signal), type @kbd{C-g} again; this sends |
| 414 | @code{SIGKILL} signal which is impossible to ignore. | 414 | 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. | ||
| 415 | 419 | ||
| 416 | To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command | 420 | To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command |
| 417 | @kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}. | 421 | @kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}. |
| @@ -704,12 +708,12 @@ specializations of Shell mode. | |||
| 704 | @subsection Shell Command History | 708 | @subsection Shell Command History |
| 705 | 709 | ||
| 706 | Shell buffers support three ways of repeating earlier commands. You | 710 | Shell buffers support three ways of repeating earlier commands. You |
| 707 | can use the same keys used in the minibuffer; these work much as they do | 711 | can use keys like those used for the minibuffer history; these work |
| 708 | in the minibuffer, inserting text from prior commands while point | 712 | much as they do in the minibuffer, inserting text from prior commands |
| 709 | remains always at the end of the buffer. You can move through the | 713 | while point remains always at the end of the buffer. You can move |
| 710 | buffer to previous inputs in their original place, then resubmit them or | 714 | through the buffer to previous inputs in their original place, then |
| 711 | copy them to the end. Or you can use a @samp{!}-style history | 715 | resubmit them or copy them to the end. Or you can use a |
| 712 | reference. | 716 | @samp{!}-style history reference. |
| 713 | 717 | ||
| 714 | @menu | 718 | @menu |
| 715 | * Ring: Shell Ring. Fetching commands from the history list. | 719 | * Ring: Shell Ring. Fetching commands from the history list. |
| @@ -724,11 +728,13 @@ reference. | |||
| 724 | @findex comint-previous-input | 728 | @findex comint-previous-input |
| 725 | @kindex M-p @r{(Shell mode)} | 729 | @kindex M-p @r{(Shell mode)} |
| 726 | @item M-p | 730 | @item M-p |
| 731 | @itemx C-@key{UP} | ||
| 727 | Fetch the next earlier old shell command. | 732 | Fetch the next earlier old shell command. |
| 728 | 733 | ||
| 729 | @kindex M-n @r{(Shell mode)} | 734 | @kindex M-n @r{(Shell mode)} |
| 730 | @findex comint-next-input | 735 | @findex comint-next-input |
| 731 | @item M-n | 736 | @item M-n |
| 737 | @itemx C-@key{DOWN} | ||
| 732 | Fetch the next later old shell command. | 738 | Fetch the next later old shell command. |
| 733 | 739 | ||
| 734 | @kindex M-r @r{(Shell mode)} | 740 | @kindex M-r @r{(Shell mode)} |
| @@ -762,11 +768,13 @@ reuse shell commands from the history, use the editing commands @kbd{M-p}, | |||
| 762 | history commands except that they operate on the text at the end of the | 768 | history commands except that they operate on the text at the end of the |
| 763 | shell buffer, where you would normally insert text to send to the shell. | 769 | shell buffer, where you would normally insert text to send to the shell. |
| 764 | 770 | ||
| 765 | @kbd{M-p} fetches an earlier shell command to the end of the shell buffer. | 771 | @kbd{M-p} fetches an earlier shell command to the end of the shell |
| 766 | Successive use of @kbd{M-p} fetches successively earlier shell commands, | 772 | buffer. Successive use of @kbd{M-p} fetches successively earlier |
| 767 | each replacing any text that was already present as potential shell input. | 773 | shell commands, each replacing any text that was already present as |
| 768 | @kbd{M-n} does likewise except that it finds successively more recent shell | 774 | potential shell input. @kbd{M-n} does likewise except that it finds |
| 769 | commands from the buffer. | 775 | 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}. | ||
| 770 | 778 | ||
| 771 | The history search commands @kbd{M-r} and @kbd{M-s} read a regular | 779 | The history search commands @kbd{M-r} and @kbd{M-s} read a regular |
| 772 | expression and search through the history for a matching command. Aside | 780 | expression and search through the history for a matching command. Aside |
| @@ -948,6 +956,10 @@ the value is @code{other}, point jumps in all nonselected windows that | |||
| 948 | show the current buffer. The default value is @code{nil}, which means | 956 | show the current buffer. The default value is @code{nil}, which means |
| 949 | point does not jump to the end. | 957 | point does not jump to the end. |
| 950 | 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 | |||
| 951 | @vindex comint-input-ignoredups | 963 | @vindex comint-input-ignoredups |
| 952 | The variable @code{comint-input-ignoredups} controls whether successive | 964 | The variable @code{comint-input-ignoredups} controls whether successive |
| 953 | identical inputs are stored in the input history. A non-@code{nil} | 965 | identical inputs are stored in the input history. A non-@code{nil} |
| @@ -1297,10 +1309,10 @@ long as you like to edit the files in Emacs.) | |||
| 1297 | running @code{emacsclient} in a script. It specifies a command to run | 1309 | running @code{emacsclient} in a script. It specifies a command to run |
| 1298 | if @code{emacsclient} fails to contact Emacs. For example, the | 1310 | if @code{emacsclient} fails to contact Emacs. For example, the |
| 1299 | following setting for the @var{EDITOR} environment variable will | 1311 | following setting for the @var{EDITOR} environment variable will |
| 1300 | always give an editor, even if Emacs is not running: | 1312 | always give you an editor, even if no Emacs server is running: |
| 1301 | 1313 | ||
| 1302 | @example | 1314 | @example |
| 1303 | EDITOR="emacsclient --alternate-editor vi +%d %s" | 1315 | EDITOR="emacsclient --alternate-editor emacs +%d %s" |
| 1304 | @end example | 1316 | @end example |
| 1305 | 1317 | ||
| 1306 | @noindent | 1318 | @noindent |
| @@ -1537,8 +1549,8 @@ described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}. | |||
| 1537 | @cindex sorting | 1549 | @cindex sorting |
| 1538 | 1550 | ||
| 1539 | Emacs provides several commands for sorting text in the buffer. All | 1551 | Emacs provides several commands for sorting text in the buffer. All |
| 1540 | operate on the contents of the region (the text between point and the | 1552 | operate on the contents of the region. |
| 1541 | mark). They divide the text of the region into many @dfn{sort records}, | 1553 | They divide the text of the region into many @dfn{sort records}, |
| 1542 | identify a @dfn{sort key} for each record, and then reorder the records | 1554 | identify a @dfn{sort key} for each record, and then reorder the records |
| 1543 | into the order determined by the sort keys. The records are ordered so | 1555 | into the order determined by the sort keys. The records are ordered so |
| 1544 | that their keys are in alphabetical order, or, for numeric sorting, in | 1556 | that their keys are in alphabetical order, or, for numeric sorting, in |
| @@ -1895,7 +1907,7 @@ subsequent Emacs sessions reload the saved desktop. | |||
| 1895 | @findex desktop-save | 1907 | @findex desktop-save |
| 1896 | @vindex desktop-save-mode | 1908 | @vindex desktop-save-mode |
| 1897 | You can save the desktop manually with the command @kbd{M-x | 1909 | You can save the desktop manually with the command @kbd{M-x |
| 1898 | desktop-save}. You can also enable automatical desktop saving when | 1910 | desktop-save}. You can also enable automatic desktop saving when |
| 1899 | you exit Emacs: use the Customization buffer (@pxref{Easy | 1911 | you exit Emacs: use the Customization buffer (@pxref{Easy |
| 1900 | Customization}) to set @code{desktop-save-mode} to @code{t} for future | 1912 | Customization}) to set @code{desktop-save-mode} to @code{t} for future |
| 1901 | sessions, or add this line in your @file{~/.emacs} file: | 1913 | sessions, or add this line in your @file{~/.emacs} file: |
| @@ -1962,7 +1974,7 @@ for the debugger, within the recursive editing level for @kbd{C-r}. | |||
| 1962 | Mode lines display a pair of square brackets for each recursive editing | 1974 | Mode lines display a pair of square brackets for each recursive editing |
| 1963 | level currently in progress. | 1975 | level currently in progress. |
| 1964 | 1976 | ||
| 1965 | Exiting the inner recursive edit (such as, with the debugger @kbd{c} | 1977 | Exiting the inner recursive edit (such as with the debugger @kbd{c} |
| 1966 | command) resumes the command running in the next level up. When that | 1978 | command) resumes the command running in the next level up. When that |
| 1967 | command finishes, you can then use @kbd{C-M-c} to exit another recursive | 1979 | command finishes, you can then use @kbd{C-M-c} to exit another recursive |
| 1968 | editing level, and so on. Exiting applies to the innermost level only. | 1980 | editing level, and so on. Exiting applies to the innermost level only. |
| @@ -2041,11 +2053,8 @@ buffers or major modes while in EDT emulation. | |||
| 2041 | @cindex ``PC'' key bindings | 2053 | @cindex ``PC'' key bindings |
| 2042 | The command @kbd{M-x pc-bindings-mode} sets up certain key bindings | 2054 | The command @kbd{M-x pc-bindings-mode} sets up certain key bindings |
| 2043 | for ``PC compatibility''---what people are often used to on PCs---as | 2055 | for ``PC compatibility''---what people are often used to on PCs---as |
| 2044 | follows: @kbd{Delete} and its variants delete forward instead of | 2056 | follows: @kbd{M-Backspace} does undo, @kbd{Home} and @kbd{End} |
| 2045 | backward, @kbd{C-Backspace} kills backward a word (as @kbd{C-Delete} | 2057 | move to beginning and end of line, and @kbd{C-Escape} does |
| 2046 | normally would), @kbd{M-Backspace} does undo, @kbd{Home} and @kbd{End} | ||
| 2047 | move to beginning and end of line, @kbd{C-Home} and @kbd{C-End} move | ||
| 2048 | to beginning and end of buffer and @kbd{C-Escape} does | ||
| 2049 | @code{list-buffers}. | 2058 | @code{list-buffers}. |
| 2050 | 2059 | ||
| 2051 | @item PC Selection mode | 2060 | @item PC Selection mode |
| @@ -2132,9 +2141,13 @@ key bindings. | |||
| 2132 | @cindex navigation | 2141 | @cindex navigation |
| 2133 | Various modes documented elsewhere have hypertext features so that | 2142 | Various modes documented elsewhere have hypertext features so that |
| 2134 | you can follow links, usually by clicking @kbd{Mouse-2} on the link or | 2143 | you can follow links, usually by clicking @kbd{Mouse-2} on the link or |
| 2135 | typing @key{RET} while point is on the link. Info mode, Help mode and | 2144 | typing @key{RET} while point is on the link. Clicking @kbd{Mouse-1} |
| 2136 | the Dired-like modes are examples. The Tags facility links between | 2145 | quickly on the link also follows it. (Hold @kbd{Mouse-1} for longer |
| 2137 | uses and definitions in source files, see @ref{Tags}. Imenu provides | 2146 | 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 | ||
| 2138 | navigation amongst items indexed in the current buffer, see | 2151 | navigation amongst items indexed in the current buffer, see |
| 2139 | @ref{Imenu}. Info-lookup provides mode-specific lookup of definitions | 2152 | @ref{Imenu}. Info-lookup provides mode-specific lookup of definitions |
| 2140 | in Info indexes, see @ref{Documentation}. Speedbar maintains a frame | 2153 | in Info indexes, see @ref{Documentation}. Speedbar maintains a frame |
| @@ -2149,7 +2162,6 @@ fashion. | |||
| 2149 | * Browse-URL:: Following URLs. | 2162 | * Browse-URL:: Following URLs. |
| 2150 | * Goto-address:: Activating URLs. | 2163 | * Goto-address:: Activating URLs. |
| 2151 | * FFAP:: Finding files etc. at point. | 2164 | * FFAP:: Finding files etc. at point. |
| 2152 | * Find-func:: Finding function and variable definitions. | ||
| 2153 | @end menu | 2165 | @end menu |
| 2154 | 2166 | ||
| 2155 | @node Browse-URL | 2167 | @node Browse-URL |
| @@ -2288,41 +2300,6 @@ Display a menu of files and URLs mentioned in current buffer, then | |||
| 2288 | find the one you select (@code{ffap-menu}). | 2300 | find the one you select (@code{ffap-menu}). |
| 2289 | @end table | 2301 | @end table |
| 2290 | 2302 | ||
| 2291 | @node Find-func | ||
| 2292 | @subsection Finding Function and Variable Definitions | ||
| 2293 | @cindex definitions, finding in Lisp sources | ||
| 2294 | @cindex Lisp definitions, finding in sources | ||
| 2295 | |||
| 2296 | @table @kbd | ||
| 2297 | @item M-x find-function @key{RET} @var{function} @key{RET} | ||
| 2298 | Find the definition of @var{function} in its source file. | ||
| 2299 | @item M-x find-variable @key{RET} @var{variable} @key{RET} | ||
| 2300 | Find the definition of @var{variable} in its source file. | ||
| 2301 | @item M-x find-function-on-key @key{RET} @var{key} | ||
| 2302 | Find the definition of the function that @var{key} invokes. | ||
| 2303 | @end table | ||
| 2304 | |||
| 2305 | These commands provide an easy way to find the definitions of Emacs | ||
| 2306 | Lisp functions and variables. They are similar in purpose to the Tags | ||
| 2307 | facility (@pxref{Tags}), but don't require a tags table; on the other | ||
| 2308 | hand, they only work for function and variable definitions that are | ||
| 2309 | already loaded in the Emacs session. | ||
| 2310 | |||
| 2311 | @findex find-function | ||
| 2312 | @findex find-function-on-key | ||
| 2313 | @findex find-variable | ||
| 2314 | To find the definition of a function, use @kbd{M-x find-function}. | ||
| 2315 | @kbd{M-x find-variable} finds the definition of a specified variable. | ||
| 2316 | @kbd{M-x find-function-on-key} finds the definition of the function | ||
| 2317 | bound to a specified key. | ||
| 2318 | |||
| 2319 | To use these commands, you must have the Lisp source (@samp{.el}) | ||
| 2320 | files available along with the compiled (@samp{.elc}) files, in | ||
| 2321 | directories in @code{load-path}. You can use compressed source files | ||
| 2322 | if you enable Auto Compression mode. These commands only handle | ||
| 2323 | definitions written in Lisp, not primitive functions or variables | ||
| 2324 | defined in the C code of Emacs. | ||
| 2325 | |||
| 2326 | @node Dissociated Press, Amusements, Hyperlinking, Top | 2303 | @node Dissociated Press, Amusements, Hyperlinking, Top |
| 2327 | @section Dissociated Press | 2304 | @section Dissociated Press |
| 2328 | 2305 | ||