aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-05-12 04:12:27 +0000
committerChong Yidong2009-05-12 04:12:27 +0000
commit932fd020b338ea7f9a9960d4687b855e3c67c476 (patch)
treeb7d5d974c42963243ebeb12bfad4565020241f22
parentded5dab72eff2547981ee875b33fa49fa5ea45c1 (diff)
downloademacs-932fd020b338ea7f9a9960d4687b855e3c67c476.tar.gz
emacs-932fd020b338ea7f9a9960d4687b855e3c67c476.zip
* misc.texi (Interactive Shell, Saving Emacs Sessions)
(Shell History Copying, Terminal emulator): Copyedits.
-rw-r--r--doc/emacs/ChangeLog3
-rw-r--r--doc/emacs/misc.texi93
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 @@
12009-05-12 Chong Yidong <cyd@stupidchicken.com> 12009-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
565name is relative, Emacs searches the directories in the list 565name 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
567variable @env{PATH} when Emacs is started. Your @file{.emacs} file 567variable @env{PATH} when Emacs is started. Your init file can
568can override either or both of these default initializations. 568override either or both of these default initializations (@pxref{Init
569File}).
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,
571unless you end the command with @samp{&} to make it asynchronous. To 572unless 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
598buffer, 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 600input coming from and output going to that buffer. That is to say,
600to that buffer. That is to say, any ``terminal output'' from the subshell 601any ``terminal output'' from the subshell goes into the buffer,
601goes into the buffer, advancing point, and any ``terminal input'' for 602advancing point, and any ``terminal input'' for the subshell comes
602the subshell comes from text in the buffer. To give input to the subshell, 603from text in the buffer. To give input to the subshell, go to the end
603go to the end of the buffer and type the input, terminated by @key{RET}. 604of 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
606windows or buffers and edit them while the shell is waiting, or while it is 607windows 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}.
631the environment variable @env{ESHELL} is used, or the environment 632Otherwise, the environment variable @env{ESHELL} is used, or the
632variable @env{SHELL} if there is no @env{ESHELL}. If the file name 633environment variable @env{SHELL} if there is no @env{ESHELL}. If the
633specified is relative, the directories in the list @code{exec-path} are 634file name specified is relative, the directories in the list
634searched; 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 636environment variable @env{PATH} when Emacs is started. Your init file
636either or both of these default initializations. 637can 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}
1046Copy the input command which point is in, inserting the copy at the end 1048Copy the input command at point, inserting the copy at the end of the
1047of the buffer (@code{comint-copy-old-input}). This is useful if you 1049buffer (@code{comint-copy-old-input}). This is useful if you move
1048move point back to a previous command. After you copy the command, you 1050point back to a previous command. After you copy the command, you can
1049can submit the copy as input with @key{RET}. If you wish, you can 1051submit the copy as input with @key{RET}. If you wish, you can edit
1050edit the copy before resubmitting it. If you use this command on an 1052the copy before resubmitting it. If you use this command on an output
1051output line, it copies that line to the end of the buffer. 1053line, it copies that line to the end of the buffer.
1052 1054
1053@item Mouse-2 1055@item Mouse-2
1054If @code{comint-use-prompt-regexp} is @code{nil} (the default), copy 1056If @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
1216an Emacs buffer, use @kbd{M-x term}. This creates (or reuses) a 1218creates (or reuses) a buffer named @samp{*terminal*}, and runs a
1217buffer named @samp{*terminal*}, and runs a subshell with input coming 1219subshell with input coming from your keyboard, and output going to
1218from your keyboard, and output going to that buffer. 1220that 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
1221line mode, Term basically acts like Shell mode; see @ref{Shell Mode}. 1223line 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.
1238You can actually run Emacs inside an Emacs Term window. 1240You 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
1241serial port of your computer, see @ref{Serial Terminal}. 1243serial 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
1244as for Shell mode. To make multiple terminal emulators, rename the 1246as 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}
1576Specify a command to run if @code{emacsclient} fails to contact Emacs. 1578Specify a command to run if @code{emacsclient} fails to contact Emacs.
1577This is useful when running @code{emacsclient} in a script. If 1579This is useful when running @code{emacsclient} in a script. For
1578@var{command} is the empty string, then start Emacs in daemon mode and 1580example, the following setting for the @env{EDITOR} environment
1579try connecting again. For example, the following setting for the 1581variable will always give you an editor, even if no Emacs server is
1580@env{EDITOR} environment variable will always give you an editor, even 1582running:
1581if no Emacs server is running:
1582 1583
1583@example 1584@example
1584EDITOR="emacsclient --alternate-editor emacs +%d %s" 1585EDITOR="emacsclient --alternate-editor emacs +%d %s"
1585@end example 1586@end example
1586 1587
1587@noindent 1588@noindent
1589As a special exception, if @var{command} is the empty string, then
1590@code{emacsclient} starts Emacs in daemon mode and then tries
1591connecting again.
1592
1588@cindex @env{ALTERNATE_EDITOR} environment variable 1593@cindex @env{ALTERNATE_EDITOR} environment variable
1589The environment variable @env{ALTERNATE_EDITOR} has the same effect, 1594The environment variable @env{ALTERNATE_EDITOR} has the same effect as
1590with the value of the @samp{--alternate-editor} option taking 1595the @samp{-a} option. If both are present, the latter takes
1591precedence. 1596precedence.
1592 1597
1593@item -c 1598@item -c
@@ -2321,7 +2326,7 @@ desktop-save}. You can also enable automatic saving of the desktop
2321when you exit Emacs, and automatic restoration of the last saved 2326when you exit Emacs, and automatic restoration of the last saved
2322desktop when Emacs starts: use the Customization buffer (@pxref{Easy 2327desktop when Emacs starts: use the Customization buffer (@pxref{Easy
2323Customization}) to set @code{desktop-save-mode} to @code{t} for future 2328Customization}) to set @code{desktop-save-mode} to @code{t} for future
2324sessions, or add this line in your @file{~/.emacs} file: 2329sessions, 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
2333then when Emacs starts, it looks for a saved desktop in the current 2338Emacs starts, it looks for a saved desktop in the current directory.
2334directory. Thus, you can have separate saved desktops in different 2339Thus, you can have separate saved desktops in different directories,
2335directories, and the starting directory determines which one Emacs 2340and the starting directory determines which one Emacs reloads. You
2336reloads. You can save the current desktop and reload one saved in 2341can save the current desktop and reload one saved in another directory
2337another directory by typing @kbd{M-x desktop-change-dir}. Typing 2342by typing @kbd{M-x desktop-change-dir}. Typing @kbd{M-x
2338@kbd{M-x desktop-revert} reverts to the desktop previously reloaded. 2343desktop-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
2341don't want it to reload any saved desktop. This turns off 2346don'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
2343the @samp{--no-init-file} option also disables desktop reloading, 2348the @samp{--no-init-file} option also disables desktop reloading,
2344since it bypasses the @file{.emacs} init file, where 2349since it bypasses the init file, where @code{desktop-save-mode} is
2345@code{desktop-save-mode} is usually turned on. 2350usually 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.