From a73a3461db808a5b616aa0a654d9e9b6d2fd18d3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 14 Jan 2012 17:17:25 +0800 Subject: [PATCH] Update Emacs Invocation chapter of Emacs manual. * doc/emacs/cmdargs.texi (Action Arguments): No need to mention EMACSLOADPATH. (General Variables): Add xref to Lisp Libraries. (Initial Options): Copyedits. (Resume Arguments): Node deleted; emacs.bash/csh are obsolete. (Environment): Clarify what getenv does. (General Variables): Clarify EMACSPATH etc. Emacs does not assume light backgrounds on xterms. (Misc Variables): TEMP and TMP are not Windows-specific. (Display X): Copyedits. (Colors X): -bd does nothing for GTK. (Icons X): Gnome 3 doesn't use taskbars. * doc/emacs/misc.texi (Shell): Document exec-path here. * doc/emacs/rmail.texi (Movemail): Add xref for exec-path. --- admin/FOR-RELEASE | 2 +- doc/emacs/ChangeLog | 19 +++ doc/emacs/cmdargs.texi | 226 ++++++++++++----------------- doc/emacs/emacs.texi | 1 - doc/emacs/files.texi | 7 +- doc/emacs/misc.texi | 16 +- doc/emacs/rmail.texi | 4 +- etc/tutorials/TUTORIAL.translators | 5 +- 8 files changed, 132 insertions(+), 148 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index c82dbf36f0d..95b79c51c3a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -133,7 +133,7 @@ buffers.texi cyd building.texi cyd calendar.texi cal-xtra.texi -cmdargs.texi +cmdargs.texi cyd commands.texi cyd custom.texi cyd dired.texi cyd diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 8f7f8ebb220..ab8c822ffcf 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,22 @@ +2012-01-14 Chong Yidong + + * cmdargs.texi (Action Arguments): No need to mention + EMACSLOADPATH. + (General Variables): Add xref to Lisp Libraries. + (Initial Options): Copyedits. + (Resume Arguments): Node deleted; emacs.bash/csh are obsolete. + (Environment): Clarify what getenv does. + (General Variables): Clarify EMACSPATH etc. Emacs does not assume + light backgrounds on xterms. + (Misc Variables): TEMP and TMP are not Windows-specific. + (Display X): Copyedits. + (Colors X): -bd does nothing for GTK. + (Icons X): Gnome 3 doesn't use taskbars. + + * misc.texi (Shell): Document exec-path here. + + * rmail.texi (Movemail): Add xref for exec-path. + 2012-01-13 Glenn Morris * dired.texi (Dired and Find): Clarify find-ls-options. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 11cc4df8ce9..00730cc6510 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -65,7 +65,6 @@ arguments.) and call functions. * Initial Options:: Arguments that take effect while starting Emacs. * Command Example:: Examples of using command line arguments. -* Resume Arguments:: Specifying arguments when you resume a running Emacs. * Environment:: Environment variables that Emacs uses. * Display X:: Changing the default display and using remote login. * Font X:: Choosing a font for text, under X. @@ -124,10 +123,9 @@ Visit @var{file} using @code{find-file}, then go to line number @opindex --load @cindex loading Lisp libraries, command-line argument Load a Lisp library named @var{file} with the function @code{load}. -@xref{Lisp Libraries}. If @var{file} is not an absolute file name, -the library can be found either in the current directory, or in the -Emacs library search path as specified with @env{EMACSLOADPATH} -(@pxref{General Variables}). +If @var{file} is not an absolute file name, Emacs first looks for it +in the current directory, then in the directories listed in +@code{load-path} (@pxref{Lisp Libraries}). @strong{Warning:} If previous command-line arguments have visited files, the current directory is the directory of the last file @@ -186,11 +184,11 @@ specifically related to the X Window System appear in the following sections. Some initial options affect the loading of the initialization file. -The normal actions of Emacs are to first load @file{site-start.el} if -it exists, then your own initialization file @file{~/.emacs} if it -exists, and finally @file{default.el} if it exists. @xref{Init File}. -Certain options prevent loading of some of these files or substitute -other files for them. +Normally, Emacs first loads @file{site-start.el} if it exists, then +your own initialization file if it exists, and finally the default +initialization file @file{default.el} if it exists (@pxref{Init +File}). Certain options prevent loading of some of these files or +substitute other files for them. @table @samp @item -chdir @var{directory} @@ -207,8 +205,8 @@ stopped. This makes desktop saving and restoring easier. @itemx --terminal=@var{device} @opindex --terminal @cindex device for Emacs terminal I/O -Use @var{device} as the device for terminal input and output. -@samp{--terminal} implies @samp{--no-window-system}. +Use @var{device} as the device for terminal input and output. This +option implies @samp{--no-window-system}. @item -d @var{display} @opindex -d @@ -252,7 +250,7 @@ terminal's standard input stream (@code{stdin}) instead. @samp{--batch} implies @samp{-q} (do not load an initialization file), but @file{site-start.el} is loaded nonetheless. It also causes Emacs to exit after processing all the command options. In addition, it -disables auto-saving except in buffers for which it has been +disables auto-saving except in buffers for which auto-saving is explicitly requested. @item --script @var{file} @@ -270,8 +268,8 @@ Emacs. They can start with this text on the first line @noindent which will invoke Emacs with @samp{--script} and supply the name of -the script file as @var{file}. Emacs Lisp then treats @samp{#!} as a -comment delimiter. +the script file as @var{file}. Emacs Lisp then treats the @samp{#!} +on this first line as a comment delimiter. @item -q @opindex -q @@ -280,11 +278,10 @@ comment delimiter. @cindex bypassing init and @file{default.el} file @cindex init file, not loading @cindex @file{default.el} file, not loading -Do not load your Emacs initialization file, and do not load the file -@file{default.el} either (@pxref{Init File}). Regardless of this -switch, @file{site-start.el} is still loaded. When Emacs is invoked -like this, the Customize facility does not allow options to be saved -(@pxref{Easy Customization}). +Do not load any initialization file (@pxref{Init File}). When Emacs +is invoked with this option, the Customize facility does not allow +options to be saved (@pxref{Easy Customization}). This option does +not disable loading @file{site-start.el}. @item --no-site-file @opindex --no-site-file @@ -371,45 +368,6 @@ also guarantees there will be no problem redirecting output to @file{log}, because Emacs will not assume that it has a display terminal to work with. -@node Resume Arguments -@appendixsec Resuming Emacs with Arguments - - You can specify action arguments for Emacs when you resume it after -a suspension. To prepare for this, put the following code in your -@file{.emacs} file (@pxref{Hooks}): - -@c `resume-suspend-hook' is correct. It is the name of a function. -@example -(add-hook 'suspend-hook 'resume-suspend-hook) -(add-hook 'suspend-resume-hook 'resume-process-args) -@end example - - As further preparation, you must execute the shell script -@file{emacs.csh} (if you use csh as your shell) or @file{emacs.bash} -(if you use bash as your shell). These scripts define an alias named -@code{edit}, which will resume Emacs giving it new command line -arguments such as files to visit. The scripts are found in the -@file{etc} subdirectory of the Emacs distribution. - - Only action arguments work properly when you resume Emacs. Initial -arguments are not recognized---it's too late to execute them anyway. - - Note that resuming Emacs (with or without arguments) must be done from -within the shell that is the parent of the Emacs job. This is why -@code{edit} is an alias rather than a program or a shell script. It is -not possible to implement a resumption command that could be run from -other subjobs of the shell; there is no way to define a command that could -be made the value of @env{EDITOR}, for example. Therefore, this feature -does not take the place of the Emacs Server feature (@pxref{Emacs -Server}). - - The aliases use the Emacs Server feature if you appear to have a -server Emacs running. However, they cannot determine this with complete -accuracy. They may think that a server is still running when in -actuality you have killed that Emacs, because the file -@file{/tmp/esrv@dots{}} still exists. If this happens, find that -file and delete it. - @node Environment @appendixsec Environment Variables @cindex environment variables @@ -424,19 +382,19 @@ letters only. The values are all text strings. environment automatically from their parent process. This means you can set up an environment variable in your login shell, and all the programs you run (including Emacs) will automatically see it. -Subprocesses of Emacs (such as shells, compilers, and version-control -software) inherit the environment from Emacs, too. +Subprocesses of Emacs (such as shells, compilers, and version control +programs) inherit the environment from Emacs, too. @findex setenv @findex getenv @vindex initial-environment - Inside Emacs, the command @kbd{M-x getenv} gets the value of an -environment variable. @kbd{M-x setenv} sets a variable in the Emacs -environment, and @kbd{C-u M-x setenv} removes a variable. -(Environment variable substitutions with @samp{$} work in the value -just as in file names; see @ref{File Names with $}.) The variable -@code{initial-environment} stores the initial environment inherited by -Emacs. + Inside Emacs, the command @kbd{M-x getenv} reads the name of an +environment variable, and prints its value in the echo area. @kbd{M-x +setenv} sets a variable in the Emacs environment, and @kbd{C-u M-x +setenv} removes a variable. (Environment variable substitutions with +@samp{$} work in the value just as in file names; see @ref{File Names +with $}.) The variable @code{initial-environment} stores the initial +environment inherited by Emacs. The way to set environment variables outside of Emacs depends on the operating system, and especially the shell that you are using. For @@ -483,22 +441,25 @@ This is used to initialize the Lisp variable @code{data-directory}. Directory for the documentation string file, which is used to initialize the Lisp variable @code{doc-directory}. @item EMACSLOADPATH -A colon-separated list of directories@footnote{ -Here and below, whenever we say ``colon-separated list of directories,'' -it pertains to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, -the directories are separated by semi-colons instead, since DOS/Windows -file names might include a colon after a drive letter.} -to search for Emacs Lisp files---used to initialize @code{load-path}. +A colon-separated list of directories@footnote{ Here and below, +whenever we say ``colon-separated list of directories,'' it pertains +to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the +directories are separated by semi-colons instead, since DOS/Windows +file names might include a colon after a drive letter.} to search for +Emacs Lisp files. If set, it overrides the usual initial value of the +@code{load-path} variable (@pxref{Lisp Libraries}). @item EMACSPATH -A colon-separated list of directories to search for executable -files---used to initialize @code{exec-path}. +A colon-separated list of directories to search for executable files. +If set, Emacs uses this in addition to @env{PATH} (see below) when +initializing the variable @code{exec-path} (@pxref{Shell}). @item EMAIL @vindex user-mail-address@r{, initialization} Your email address; used to initialize the Lisp variable -@code{user-mail-address}, which the Emacs mail interface puts into -the @samp{From} header of outgoing messages (@pxref{Mail Headers}). +@code{user-mail-address}, which the Emacs mail interface puts into the +@samp{From} header of outgoing messages (@pxref{Mail Headers}). @item ESHELL -Used for shell-mode to override the @env{SHELL} environment variable. +Used for shell-mode to override the @env{SHELL} environment variable +(@pxref{Interactive Shell}). @item HISTFILE The name of the file that shell commands are saved in between logins. This variable defaults to @file{~/.bash_history} if you use Bash, to @@ -554,23 +515,28 @@ environment and coding system. @xref{Language Environments}. The user's login name. See also @env{USER}. @item MAIL The name of your system mail inbox. +@ifnottex @item MH -Name of setup file for the mh system. (The default is @file{~/.mh_profile}.) +Name of setup file for the mh system. @xref{Top,,MH-E,mh-e, The Emacs +Interface to MH}. +@end ifnottex @item NAME -Your real-world name. +Your real-world name. This is used to initialize the variable +@code{user-full-name} (@pxref{Mail Headers}). @item NNTPSERVER The name of the news server. Used by the mh and Gnus packages. @item ORGANIZATION The name of the organization to which you belong. Used for setting the `Organization:' header in your posts from the Gnus package. @item PATH -A colon-separated list of directories in which executables reside. This -is used to initialize the Emacs Lisp variable @code{exec-path}. +A colon-separated list of directories containing executable files. +This is used to initialize the variable @code{exec-path} +(@pxref{Shell}). @item PWD If set, this should be the default directory when Emacs was started. @item REPLYTO If set, this specifies an initial value for the variable -@code{mail-default-reply-to}. @xref{Mail Headers}. +@code{mail-default-reply-to} (@pxref{Mail Headers}). @item SAVEDIR The name of a directory in which news articles are saved by default. Used by the Gnus package. @@ -578,23 +544,29 @@ Used by the Gnus package. The name of an interpreter used to parse and execute programs run from inside Emacs. @item SMTPSERVER -The name of the outgoing mail server. Used by the SMTP library -(@pxref{Top,,,smtpmail,Sending mail via SMTP}). +The name of the outgoing mail server. This is used to initialize the +variable @code{smtpmail-smtp-server} (@pxref{Mail Sending}). @cindex background mode, on @command{xterm} @item TERM The type of the terminal that Emacs is using. This variable must be set unless Emacs is run in batch mode. On MS-DOS, it defaults to @samp{internal}, which specifies a built-in terminal emulation that -handles the machine's own display. If the value of @env{TERM} indicates -that Emacs runs in non-windowed mode from @command{xterm} or a similar -terminal emulator, the background mode defaults to @samp{light}, and -Emacs will choose colors that are appropriate for a light background. +handles the machine's own display. @item TERMCAP The name of the termcap library file describing how to program the -terminal specified by the @env{TERM} variable. This defaults to +terminal specified by @env{TERM}. This defaults to @file{/etc/termcap}. @item TMPDIR -Used by the Emerge package as a prefix for temporary files. +@itemx TMP +@itemx TEMP +These environment variables are used to initialize the variable +@code{temporary-file-directory}, which specifies a directory in which +to put temporary files (@pxref{Backup}). Emacs tries to use +@env{TMPDIR} first; if that is unset, it tries @env{TMP}, then +@env{TEMP}, and finally @file{/tmp}. But on MS-Windows and MS-DOS, +Emacs tries @env{TEMP}, then @env{TMPDIR}, then @env{TMP}, and finally +@file{c:/temp}. + @item TZ This specifies the current time zone and possibly also daylight saving time information. On MS-DOS, if @env{TZ} is not set in the @@ -624,11 +596,6 @@ variable. On MS-DOS, this variable defaults to the value of the @env{USER} variable. -@item TEMP -@itemx TMP -On MS-DOS and MS-Windows, these specify the name of the directory for -storing temporary files in. - @item EMACSTEST On MS-DOS, this specifies a file to use to log the operation of the internal terminal emulator. This feature is useful for submitting bug @@ -710,27 +677,21 @@ of the settings which on X belong in the @file{.Xdefaults} file @cindex display name (X Window System) @cindex @env{DISPLAY} environment variable - The environment variable @env{DISPLAY} tells all X clients, including -Emacs, where to display their windows. Its value is set by default -in ordinary circumstances, when you start an X server and run jobs -locally. Occasionally you may need to specify the display yourself; for -example, if you do a remote login and want to run a client program -remotely, displaying on your local screen. - - With Emacs, the main reason people change the default display is to -let them log into another system, run Emacs on that system, but have the -window displayed at their local terminal. You might need to log in -to another system because the files you want to edit are there, or -because the Emacs executable file you want to run is there. + The environment variable @env{DISPLAY} tells all X clients, +including Emacs, where to display their windows. Its value is set by +default in ordinary circumstances, when you start an X server and run +jobs locally. You can specify the display yourself; one reason to do +this is if you want to log into another system and run Emacs there, +and have the window displayed at your local terminal. @env{DISPLAY} has the syntax @samp{@var{host}:@var{display}.@var{screen}}, where @var{host} is the host name of the X Window System server machine, @var{display} is an arbitrarily-assigned number that distinguishes your server (X terminal) from other servers on the same machine, and @var{screen} is -a rarely-used field that allows an X server to control multiple -terminal screens. The period and the @var{screen} field are optional. -If included, @var{screen} is usually zero. +a field that allows an X server to control multiple terminal screens. +The period and the @var{screen} field are optional. If included, +@var{screen} is usually zero. For example, if your host is named @samp{glasperle} and your server is the first (or perhaps the only) server listed in the configuration, your @@ -744,9 +705,9 @@ by changing the @env{DISPLAY} variable, or with the option @samp{-d emacs --display=glasperle:0 & @end smallexample - You can inhibit the direct use of the window system and GUI with the -@samp{-nw} option. It tells Emacs to display using ordinary @acronym{ASCII} on -its controlling terminal. This is also an initial option. + You can inhibit the use of the X window system with the @samp{-nw} +option. Then Emacs uses its controlling text terminal for display. +@xref{Initial Options}. Sometimes, security arrangements prevent a program on a remote system from displaying on your local system. In this case, trying to run Emacs @@ -778,17 +739,17 @@ font: Use @var{font} as the default font. @end table -When passing a font specification to Emacs on the command line, you -may need to ``quote'' it, by enclosing it in quotation marks, if it -contains characters that the shell treats specially (e.g.@: spaces). -For example: +When passing a font name to Emacs on the command line, you may need to +``quote'' it, by enclosing it in quotation marks, if it contains +characters that the shell treats specially (e.g.@: spaces). For +example: @smallexample emacs -fn "DejaVu Sans Mono-12" @end smallexample -@xref{Fonts}, for other ways to specify the default font and font name -formats. +@xref{Fonts}, for details about font names and other ways to specify +the default font. @node Colors X @appendixsec Window Color Options @@ -819,7 +780,8 @@ Specify the background color, overriding the color specified by the @itemx --border-color=@var{color} @opindex --border-color @cindex border color, command-line argument -Specify the color of the border of the X window. +Specify the color of the border of the X window. This has no effect +if Emacs is compiled with GTK+ support. @item -cr @var{color} @opindex -cr @itemx --cursor-color=@var{color} @@ -844,11 +806,10 @@ Reverse video---swap the foreground and background colors. @opindex --color @cindex standard colors on a character terminal @cindex override character terminal color support -For a character terminal only, specify the mode of color support. -This option is intended for overriding the number of supported colors -that the character terminal advertises in its @code{termcap} or -@code{terminfo} database. The parameter @var{mode} can be one of the -following: +Set the @dfn{color support mode} when Emacs is run on a text terminal. +This option overrides the number of supported colors that the +character terminal advertises in its @code{termcap} or @code{terminfo} +database. The parameter @var{mode} can be one of the following: @table @samp @item never @itemx no @@ -1090,7 +1051,7 @@ Start Emacs in an iconified (``minimized'') state. @itemx --no-bitmap-icon @opindex --no-bitmap-icon @cindex Emacs icon, a gnu -Do not display the Emacs icon. +Disable the use of the Emacs icon. @end table Most window managers allow you to ``iconify'' (or ``minimize'') an @@ -1102,10 +1063,11 @@ The text frame doesn't appear until you deiconify (or ``un-minimize'') it. By default, Emacs uses an icon containing the Emacs logo. On -desktop environments such as Gnome, this icon is also displayed on the -``taskbar''. The @samp{-nbi} or @samp{--no-bitmap-icon} option tells -Emacs to let the window manager choose what sort of icon to -use---usually just a small rectangle containing the frame's title. +desktop environments such as Gnome, this icon is also displayed in +other contexts, e.g.@: when switching into an Emacs frame. The +@samp{-nbi} or @samp{--no-bitmap-icon} option tells Emacs to let the +window manager choose what sort of icon to use---usually just a small +rectangle containing the frame's title. @node Misc X @appendixsec Other Display Options diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index b8722e9f850..b00625facbf 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1104,7 +1104,6 @@ Command Line Arguments for Emacs Invocation and call functions. * Initial Options:: Arguments that take effect while starting Emacs. * Command Example:: Examples of using command line arguments. -* Resume Arguments:: Specifying arguments when you resume a running Emacs. * Environment:: Environment variables that Emacs uses. * Display X:: Changing the default display and using remote login. * Font X:: Choosing a font for text, under X. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index a522e055d2b..77211a3d9ac 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1871,10 +1871,9 @@ Add each file name in @var{directory} and all of its nested subdirectories to the file name cache, using @command{locate} to find them all. @item M-x file-cache-add-directory-list @key{RET} @var{variable} @key{RET} -Add each file name in each directory listed in @var{variable} -to the file name cache. @var{variable} should be a Lisp variable -such as @code{load-path} or @code{exec-path}, whose value is a list -of directory names. +Add each file name in each directory listed in @var{variable} to the +file name cache. @var{variable} should be a Lisp variable whose value +is a list of directory names, like @code{load-path}. @item M-x file-cache-clear-cache @key{RET} Clear the cache; that is, remove all file names from it. @end table diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 69e141efb0f..93dd5e3b8ce 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -465,6 +465,15 @@ then give commands interactively. Full terminal emulation is available. @end table +@vindex exec-path + Whenever you specify a relative file name for an executable program +(either in the @var{cmd} argument to one of the above commands, or in +other contexts), Emacs searches for the program in the directories +specified by the variable @code{exec-path}. The value of this +variable must be a list of directory names; the default value is +initialized from the environment variable @env{PATH} when Emacs is +started (@pxref{General Variables}). + @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It is documented in its own manual. @ifnottex @@ -551,11 +560,8 @@ to @command{gpg}. This will output the list of keys to the The above commands use the shell specified by the variable @code{shell-file-name}. Its default value is determined by the @env{SHELL} environment variable when Emacs is started. If the file -name is relative, Emacs searches the directories in the list -@code{exec-path}; this list is initialized based on the environment -variable @env{PATH} when Emacs is started. Your init file can -override either or both of these default initializations (@pxref{Init -File}). +name is relative, Emacs searches the directories listed in +@code{exec-path} (@pxref{Shell}). To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command @kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}. diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 9713b825ee8..be1c1f68c66 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1428,8 +1428,8 @@ This is equivalent to specifying the @samp{file} protocol: @code{movemail} to use. If that is a string, it specifies the absolute file name of the @code{movemail} executable. If it is @code{nil}, Rmail searches for @code{movemail} in the directories -listed in @code{rmail-movemail-search-path} and @code{exec-path}, then -in @code{exec-directory}. +listed in @code{rmail-movemail-search-path}, then in @code{exec-path} +(@pxref{Shell}), then in @code{exec-directory}. @node Remote Mailboxes @section Retrieving Mail from Remote Mailboxes diff --git a/etc/tutorials/TUTORIAL.translators b/etc/tutorials/TUTORIAL.translators index a69d23c471d..64780687bb1 100644 --- a/etc/tutorials/TUTORIAL.translators +++ b/etc/tutorials/TUTORIAL.translators @@ -12,8 +12,7 @@ Maintainer: Sun Yijiang * TUTORIAL.cs: Author: Milan Zamazal Pavel Janík -Maintainer: Milan Zamazal - Pavel Janík +Maintainer: Maintainer needed. * TUTORIAL.de: Author: Werner Lemberg @@ -73,7 +72,7 @@ Maintainer: Alex Ott * TUTORIAL.sk: Author: Miroslav Vaško Pavel Janík -Maintainer: Pavel Janík +Maintainer: Maintainer needed. * TUTORIAL.sl: Author: Primož Peterlin -- 2.39.2