diff options
| author | Chong Yidong | 2009-05-12 04:12:27 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-05-12 04:12:27 +0000 |
| commit | 932fd020b338ea7f9a9960d4687b855e3c67c476 (patch) | |
| tree | b7d5d974c42963243ebeb12bfad4565020241f22 | |
| parent | ded5dab72eff2547981ee875b33fa49fa5ea45c1 (diff) | |
| download | emacs-932fd020b338ea7f9a9960d4687b855e3c67c476.tar.gz emacs-932fd020b338ea7f9a9960d4687b855e3c67c476.zip | |
* misc.texi (Interactive Shell, Saving Emacs Sessions)
(Shell History Copying, Terminal emulator): Copyedits.
| -rw-r--r-- | doc/emacs/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 93 |
2 files changed, 52 insertions, 44 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 352ce8feaf1..6e3958e5081 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-05-12 Chong Yidong <cyd@stupidchicken.com> | 1 | 2009-05-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * misc.texi (Interactive Shell, Saving Emacs Sessions) | ||
| 4 | (Shell History Copying, Terminal emulator): Copyedits. | ||
| 5 | |||
| 3 | * xresources.texi (Resources): Simplify descriptions. Shorten | 6 | * xresources.texi (Resources): Simplify descriptions. Shorten |
| 4 | description of editres, which is not very useful these days. | 7 | description of editres, which is not very useful these days. |
| 5 | (Table of Resources): Document fontBackend resource. | 8 | (Table of Resources): Document fontBackend resource. |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 78f99b7a04a..465d8433fb3 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -564,8 +564,9 @@ the shell to use. This variable is initialized based on your | |||
| 564 | @env{SHELL} environment variable when Emacs is started. If the file | 564 | @env{SHELL} environment variable when Emacs is started. If the file |
| 565 | name is relative, Emacs searches the directories in the list | 565 | name is relative, Emacs searches the directories in the list |
| 566 | @code{exec-path}; this list is initialized based on the environment | 566 | @code{exec-path}; this list is initialized based on the environment |
| 567 | variable @env{PATH} when Emacs is started. Your @file{.emacs} file | 567 | variable @env{PATH} when Emacs is started. Your init file can |
| 568 | can override either or both of these default initializations. | 568 | override either or both of these default initializations (@pxref{Init |
| 569 | File}). | ||
| 569 | 570 | ||
| 570 | Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, | 571 | Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, |
| 571 | unless you end the command with @samp{&} to make it asynchronous. To | 572 | unless you end the command with @samp{&} to make it asynchronous. To |
| @@ -594,13 +595,13 @@ before point in that buffer. | |||
| 594 | @subsection Interactive Inferior Shell | 595 | @subsection Interactive Inferior Shell |
| 595 | 596 | ||
| 596 | @findex shell | 597 | @findex shell |
| 597 | To run a subshell interactively, putting its typescript in an Emacs | 598 | To run a subshell interactively, use @kbd{M-x shell}. This creates |
| 598 | buffer, use @kbd{M-x shell}. This creates (or reuses) a buffer named | 599 | (or reuses) a buffer named @samp{*shell*} and runs a subshell with |
| 599 | @samp{*shell*} and runs a subshell with input coming from and output going | 600 | input coming from and output going to that buffer. That is to say, |
| 600 | to that buffer. That is to say, any ``terminal output'' from the subshell | 601 | any ``terminal output'' from the subshell goes into the buffer, |
| 601 | goes into the buffer, advancing point, and any ``terminal input'' for | 602 | advancing point, and any ``terminal input'' for the subshell comes |
| 602 | the subshell comes from text in the buffer. To give input to the subshell, | 603 | from text in the buffer. To give input to the subshell, go to the end |
| 603 | go to the end of the buffer and type the input, terminated by @key{RET}. | 604 | of the buffer and type the input, terminated by @key{RET}. |
| 604 | 605 | ||
| 605 | Emacs does not wait for the subshell to do anything. You can switch | 606 | Emacs does not wait for the subshell to do anything. You can switch |
| 606 | windows or buffers and edit them while the shell is waiting, or while it is | 607 | windows or buffers and edit them while the shell is waiting, or while it is |
| @@ -627,13 +628,14 @@ Subshells in different buffers run independently and in parallel. | |||
| 627 | @cindex @env{ESHELL} environment variable | 628 | @cindex @env{ESHELL} environment variable |
| 628 | @cindex @env{SHELL} environment variable | 629 | @cindex @env{SHELL} environment variable |
| 629 | The file name used to load the subshell is the value of the variable | 630 | The file name used to load the subshell is the value of the variable |
| 630 | @code{explicit-shell-file-name}, if that is non-@code{nil}. Otherwise, | 631 | @code{explicit-shell-file-name}, if that is non-@code{nil}. |
| 631 | the environment variable @env{ESHELL} is used, or the environment | 632 | Otherwise, the environment variable @env{ESHELL} is used, or the |
| 632 | variable @env{SHELL} if there is no @env{ESHELL}. If the file name | 633 | environment variable @env{SHELL} if there is no @env{ESHELL}. If the |
| 633 | specified is relative, the directories in the list @code{exec-path} are | 634 | file name specified is relative, the directories in the list |
| 634 | searched; this list is initialized based on the environment variable | 635 | @code{exec-path} are searched; this list is initialized based on the |
| 635 | @env{PATH} when Emacs is started. Your @file{.emacs} file can override | 636 | environment variable @env{PATH} when Emacs is started. Your init file |
| 636 | either or both of these default initializations. | 637 | can override either or both of these default initializations. |
| 638 | (@pxref{Init File}). | ||
| 637 | 639 | ||
| 638 | Emacs sends the new shell the contents of the file | 640 | Emacs sends the new shell the contents of the file |
| 639 | @file{~/.emacs_@var{shellname}} as input, if it exists, where | 641 | @file{~/.emacs_@var{shellname}} as input, if it exists, where |
| @@ -1043,12 +1045,12 @@ Move point to the following prompt (@code{comint-next-prompt}). | |||
| 1043 | @kindex C-c RET @r{(Shell mode)} | 1045 | @kindex C-c RET @r{(Shell mode)} |
| 1044 | @findex comint-copy-old-input | 1046 | @findex comint-copy-old-input |
| 1045 | @item C-c @key{RET} | 1047 | @item C-c @key{RET} |
| 1046 | Copy the input command which point is in, inserting the copy at the end | 1048 | Copy the input command at point, inserting the copy at the end of the |
| 1047 | of the buffer (@code{comint-copy-old-input}). This is useful if you | 1049 | buffer (@code{comint-copy-old-input}). This is useful if you move |
| 1048 | move point back to a previous command. After you copy the command, you | 1050 | point back to a previous command. After you copy the command, you can |
| 1049 | can submit the copy as input with @key{RET}. If you wish, you can | 1051 | submit the copy as input with @key{RET}. If you wish, you can edit |
| 1050 | edit the copy before resubmitting it. If you use this command on an | 1052 | the copy before resubmitting it. If you use this command on an output |
| 1051 | output line, it copies that line to the end of the buffer. | 1053 | line, it copies that line to the end of the buffer. |
| 1052 | 1054 | ||
| 1053 | @item Mouse-2 | 1055 | @item Mouse-2 |
| 1054 | If @code{comint-use-prompt-regexp} is @code{nil} (the default), copy | 1056 | If @code{comint-use-prompt-regexp} is @code{nil} (the default), copy |
| @@ -1212,10 +1214,10 @@ you can enable ANSI Color mode. Here is how to do this: | |||
| 1212 | @subsection Emacs Terminal Emulator | 1214 | @subsection Emacs Terminal Emulator |
| 1213 | @findex term | 1215 | @findex term |
| 1214 | 1216 | ||
| 1215 | To run a subshell in a terminal emulator, putting its typescript in | 1217 | To run a subshell in a terminal emulator, use @kbd{M-x term}. This |
| 1216 | an Emacs buffer, use @kbd{M-x term}. This creates (or reuses) a | 1218 | creates (or reuses) a buffer named @samp{*terminal*}, and runs a |
| 1217 | buffer named @samp{*terminal*}, and runs a subshell with input coming | 1219 | subshell with input coming from your keyboard, and output going to |
| 1218 | from your keyboard, and output going to that buffer. | 1220 | that buffer. |
| 1219 | 1221 | ||
| 1220 | The terminal emulator uses Term mode, which has two input modes. In | 1222 | The terminal emulator uses Term mode, which has two input modes. In |
| 1221 | line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. | 1223 | line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. |
| @@ -1238,7 +1240,7 @@ appearance of the window matches what it would be on a real terminal. | |||
| 1238 | You can actually run Emacs inside an Emacs Term window. | 1240 | You can actually run Emacs inside an Emacs Term window. |
| 1239 | 1241 | ||
| 1240 | You can use Term mode to communicate with a device connected to a | 1242 | You can use Term mode to communicate with a device connected to a |
| 1241 | serial port of your computer, see @ref{Serial Terminal}. | 1243 | serial port of your computer. @xref{Serial Terminal}. |
| 1242 | 1244 | ||
| 1243 | The file name used to load the subshell is determined the same way | 1245 | The file name used to load the subshell is determined the same way |
| 1244 | as for Shell mode. To make multiple terminal emulators, rename the | 1246 | as for Shell mode. To make multiple terminal emulators, rename the |
| @@ -1574,20 +1576,23 @@ listed below: | |||
| 1574 | @item -a @var{command} | 1576 | @item -a @var{command} |
| 1575 | @itemx --alternate-editor=@var{command} | 1577 | @itemx --alternate-editor=@var{command} |
| 1576 | Specify a command to run if @code{emacsclient} fails to contact Emacs. | 1578 | Specify a command to run if @code{emacsclient} fails to contact Emacs. |
| 1577 | This is useful when running @code{emacsclient} in a script. If | 1579 | This is useful when running @code{emacsclient} in a script. For |
| 1578 | @var{command} is the empty string, then start Emacs in daemon mode and | 1580 | example, the following setting for the @env{EDITOR} environment |
| 1579 | try connecting again. For example, the following setting for the | 1581 | variable will always give you an editor, even if no Emacs server is |
| 1580 | @env{EDITOR} environment variable will always give you an editor, even | 1582 | running: |
| 1581 | if no Emacs server is running: | ||
| 1582 | 1583 | ||
| 1583 | @example | 1584 | @example |
| 1584 | EDITOR="emacsclient --alternate-editor emacs +%d %s" | 1585 | EDITOR="emacsclient --alternate-editor emacs +%d %s" |
| 1585 | @end example | 1586 | @end example |
| 1586 | 1587 | ||
| 1587 | @noindent | 1588 | @noindent |
| 1589 | As a special exception, if @var{command} is the empty string, then | ||
| 1590 | @code{emacsclient} starts Emacs in daemon mode and then tries | ||
| 1591 | connecting again. | ||
| 1592 | |||
| 1588 | @cindex @env{ALTERNATE_EDITOR} environment variable | 1593 | @cindex @env{ALTERNATE_EDITOR} environment variable |
| 1589 | The environment variable @env{ALTERNATE_EDITOR} has the same effect, | 1594 | The environment variable @env{ALTERNATE_EDITOR} has the same effect as |
| 1590 | with the value of the @samp{--alternate-editor} option taking | 1595 | the @samp{-a} option. If both are present, the latter takes |
| 1591 | precedence. | 1596 | precedence. |
| 1592 | 1597 | ||
| 1593 | @item -c | 1598 | @item -c |
| @@ -2321,7 +2326,7 @@ desktop-save}. You can also enable automatic saving of the desktop | |||
| 2321 | when you exit Emacs, and automatic restoration of the last saved | 2326 | when you exit Emacs, and automatic restoration of the last saved |
| 2322 | desktop when Emacs starts: use the Customization buffer (@pxref{Easy | 2327 | desktop when Emacs starts: use the Customization buffer (@pxref{Easy |
| 2323 | Customization}) to set @code{desktop-save-mode} to @code{t} for future | 2328 | Customization}) to set @code{desktop-save-mode} to @code{t} for future |
| 2324 | sessions, or add this line in your @file{~/.emacs} file: | 2329 | sessions, or add this line in your init file (@pxref{Init File}): |
| 2325 | 2330 | ||
| 2326 | @example | 2331 | @example |
| 2327 | (desktop-save-mode 1) | 2332 | (desktop-save-mode 1) |
| @@ -2329,20 +2334,20 @@ sessions, or add this line in your @file{~/.emacs} file: | |||
| 2329 | 2334 | ||
| 2330 | @findex desktop-change-dir | 2335 | @findex desktop-change-dir |
| 2331 | @findex desktop-revert | 2336 | @findex desktop-revert |
| 2332 | If you turn on @code{desktop-save-mode} in your @file{~/.emacs}, | 2337 | If you turn on @code{desktop-save-mode} in your init file, then when |
| 2333 | then when Emacs starts, it looks for a saved desktop in the current | 2338 | Emacs starts, it looks for a saved desktop in the current directory. |
| 2334 | directory. Thus, you can have separate saved desktops in different | 2339 | Thus, you can have separate saved desktops in different directories, |
| 2335 | directories, and the starting directory determines which one Emacs | 2340 | and the starting directory determines which one Emacs reloads. You |
| 2336 | reloads. You can save the current desktop and reload one saved in | 2341 | can save the current desktop and reload one saved in another directory |
| 2337 | another directory by typing @kbd{M-x desktop-change-dir}. Typing | 2342 | by typing @kbd{M-x desktop-change-dir}. Typing @kbd{M-x |
| 2338 | @kbd{M-x desktop-revert} reverts to the desktop previously reloaded. | 2343 | desktop-revert} reverts to the desktop previously reloaded. |
| 2339 | 2344 | ||
| 2340 | Specify the option @samp{--no-desktop} on the command line when you | 2345 | Specify the option @samp{--no-desktop} on the command line when you |
| 2341 | don't want it to reload any saved desktop. This turns off | 2346 | don't want it to reload any saved desktop. This turns off |
| 2342 | @code{desktop-save-mode} for the current session. Starting Emacs with | 2347 | @code{desktop-save-mode} for the current session. Starting Emacs with |
| 2343 | the @samp{--no-init-file} option also disables desktop reloading, | 2348 | the @samp{--no-init-file} option also disables desktop reloading, |
| 2344 | since it bypasses the @file{.emacs} init file, where | 2349 | since it bypasses the init file, where @code{desktop-save-mode} is |
| 2345 | @code{desktop-save-mode} is usually turned on. | 2350 | usually turned on. |
| 2346 | 2351 | ||
| 2347 | @vindex desktop-restore-eager | 2352 | @vindex desktop-restore-eager |
| 2348 | By default, all the buffers in the desktop are restored at one go. | 2353 | By default, all the buffers in the desktop are restored at one go. |