comparison man/cmdargs.texi @ 90103:3ebd9bdb4fe5

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-13 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-83 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-89 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-90 Update from CVS: man/calc.texi: Add macro for LaTeX for info output. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-91 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-94 Update from CVS
author Miles Bader <miles@gnu.org>
date Sun, 13 Feb 2005 07:19:08 +0000
parents 72cf6261961e ae756c7d3081
children bbc2e661b93c
comparison
equal deleted inserted replaced
90102:9b4f359c4117 90103:3ebd9bdb4fe5
12 GNU Emacs supports command line arguments to request various actions 12 GNU Emacs supports command line arguments to request various actions
13 when invoking Emacs. These are for compatibility with other editors and 13 when invoking Emacs. These are for compatibility with other editors and
14 for sophisticated activities. We don't recommend using them for 14 for sophisticated activities. We don't recommend using them for
15 ordinary editing. 15 ordinary editing.
16 16
17 Arguments starting with @samp{-} are @dfn{options}. Other arguments 17 Arguments starting with @samp{-} are @dfn{options}, and so is
18 specify files to visit. Emacs visits the specified files while it 18 @samp{+@var{linenum}}. All other arguments specify files to visit.
19 starts up. The last file name on your command line becomes the 19 Emacs visits the specified files while it starts up. The last file
20 current buffer; the other files are also visited in other buffers. If 20 name on your command line becomes the current buffer; the other files
21 there are two files, they are both displayed; otherwise the last file 21 are also visited in other buffers. If there are two files, they are
22 is displayed along with a buffer list that shows what other buffers 22 both displayed; otherwise the last file is displayed along with a
23 there are. As with most programs, the special argument @samp{--} says 23 buffer list that shows what other buffers there are. As with most
24 that all subsequent arguments are file names, not options, even if 24 programs, the special argument @samp{--} says that all subsequent
25 they start with @samp{-}. 25 arguments are file names, not options, even if they start with
26 @samp{-}.
26 27
27 Emacs command options can specify many things, such as the size and 28 Emacs command options can specify many things, such as the size and
28 position of the X window Emacs uses, its colors, and so on. A few 29 position of the X window Emacs uses, its colors, and so on. A few
29 options support advanced usage, such as running Lisp functions on files 30 options support advanced usage, such as running Lisp functions on files
30 in batch mode. The sections of this chapter describe the available 31 in batch mode. The sections of this chapter describe the available
109 @opindex -l 110 @opindex -l
110 @itemx --load=@var{file} 111 @itemx --load=@var{file}
111 @opindex --load 112 @opindex --load
112 @cindex loading Lisp libraries, command-line argument 113 @cindex loading Lisp libraries, command-line argument
113 Load a Lisp library named @var{file} with the function @code{load}. 114 Load a Lisp library named @var{file} with the function @code{load}.
114 @xref{Lisp Libraries}. The library can be found either in the current 115 @xref{Lisp Libraries}. If @var{file} is not an absolute file name,
115 directory, or in the Emacs library search path as specified 116 the library can be found either in the current directory, or in the
116 with @env{EMACSLOADPATH} (@pxref{General Variables}). 117 Emacs library search path as specified with @env{EMACSLOADPATH}
118 (@pxref{General Variables}).
117 119
118 @item -L @var{dir} 120 @item -L @var{dir}
119 @opindex -L 121 @opindex -L
120 @itemx --directory=@var{dir} 122 @itemx --directory=@var{dir}
121 @opindex --directory 123 @opindex --directory
216 @code{princ} and @code{print} output to @code{stdout} instead of the 218 @code{princ} and @code{print} output to @code{stdout} instead of the
217 echo area, while @code{message} and error messages output to 219 echo area, while @code{message} and error messages output to
218 @code{stderr}. Functions that would normally read from the minibuffer 220 @code{stderr}. Functions that would normally read from the minibuffer
219 take their input from @code{stdin} instead. 221 take their input from @code{stdin} instead.
220 222
221 @samp{--batch} implies @samp{-q} (do not load an init file). It also 223 @samp{--batch} implies @samp{-q} (do not load an init file), but
222 causes Emacs to exit after processing all the command options. In 224 @file{site-start.el} is loaded nonetheless. It also causes Emacs to
223 addition, it disables auto-saving except in buffers for which it has 225 exit after processing all the command options. In addition, it
224 been explicitly requested. 226 disables auto-saving except in buffers for which it has been
227 explicitly requested.
225 228
226 @item --script @var{file} 229 @item --script @var{file}
227 @opindex --script 230 @opindex --script
228 @cindex script mode 231 @cindex script mode
229 Run Emacs in batch mode, like @samp{--batch}, and then read and 232 Run Emacs in batch mode, like @samp{--batch}, and then read and
299 Do almost everything with single-byte buffers and strings. 302 Do almost everything with single-byte buffers and strings.
300 All buffers and strings are unibyte unless you (or a Lisp program) 303 All buffers and strings are unibyte unless you (or a Lisp program)
301 explicitly ask for a multibyte buffer or string. (Note that Emacs 304 explicitly ask for a multibyte buffer or string. (Note that Emacs
302 always loads Lisp files in multibyte mode, even if @samp{--unibyte} is 305 always loads Lisp files in multibyte mode, even if @samp{--unibyte} is
303 specified; see @ref{Enabling Multibyte}.) Setting the environment 306 specified; see @ref{Enabling Multibyte}.) Setting the environment
304 variable @env{EMACS_UNIBYTE} has the same effect. 307 variable @env{EMACS_UNIBYTE} has the same effect
308 (@pxref{General Variables}).
305 309
306 @item --multibyte 310 @item --multibyte
307 @opindex --multibyte 311 @opindex --multibyte
308 @itemx --no-unibyte 312 @itemx --no-unibyte
309 @opindex --no-unibyte 313 @opindex --no-unibyte
318 assumes you have a Lisp program file called @file{hack-c.el} which, when 322 assumes you have a Lisp program file called @file{hack-c.el} which, when
319 loaded, performs some useful operation on the current buffer, expected 323 loaded, performs some useful operation on the current buffer, expected
320 to be a C program. 324 to be a C program.
321 325
322 @example 326 @example
323 emacs -batch foo.c -l hack-c -f save-buffer >& log 327 emacs --batch foo.c -l hack-c -f save-buffer >& log
324 @end example 328 @end example
325 329
326 @noindent 330 @noindent
327 This says to visit @file{foo.c}, load @file{hack-c.el} (which makes 331 This says to visit @file{foo.c}, load @file{hack-c.el} (which makes
328 changes in the visited file), save @file{foo.c} (note that 332 changes in the visited file), save @file{foo.c} (note that