/[emacs]/emacs/man/cmdargs.texi
ViewVC logotype

Diff of /emacs/man/cmdargs.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63 by walters, Mon May 27 02:00:43 2002 UTC revision 1.63.2.1 by miles, Fri Apr 4 06:20:47 2003 UTC
# Line 1  Line 1 
1  @c This is part of the Emacs manual.  @c This is part of the Emacs manual.
2  @c Copyright (C) 1985,86,87,93,94,95,1997,2001 Free Software Foundation, Inc.  @c Copyright (C) 1985,86,87,93,94,95,1997,2001, 2003 Free Software Foundation, Inc.
3  @c See file emacs.texi for copying conditions.  @c See file emacs.texi for copying conditions.
4  @node Command Arguments, X Resources, Service, Top  @node Command Arguments, X Resources, Service, Top
5  @appendix Command Line Arguments  @appendix Command Line Arguments
# Line 81  the action arguments in the order they a Line 81  the action arguments in the order they a
81  @opindex --file  @opindex --file
82  @itemx --file=@var{file}  @itemx --file=@var{file}
83  @cindex visiting files, command-line argument  @cindex visiting files, command-line argument
84    @vindex inhibit-startup-buffer-menu
85  Visit @var{file} using @code{find-file}.  @xref{Visiting}.  Visit @var{file} using @code{find-file}.  @xref{Visiting}.
86    If you visit several files at startup in this way, Emacs
87    also displays a Buffer Menu buffer to show you what files it
88    has visited.  You can inhibit that by setting @code{inhibit-startup-buffer-menu} to @code{t}.
89    
90  @item +@var{linenum} @var{file}  @item +@var{linenum} @var{file}
91  @opindex +@var{linenum}  @opindex +@var{linenum}
# Line 191  shell scripts, makefiles, and so on.  No Line 195  shell scripts, makefiles, and so on.  No
195  or @samp{-f} option will be used as well, to invoke a Lisp program  or @samp{-f} option will be used as well, to invoke a Lisp program
196  to do the batch processing.  to do the batch processing.
197    
198  @samp{-batch} implies @samp{-q} (do not load an init file).  It also  @samp{--batch} implies @samp{-q} (do not load an init file).  It also
199  causes Emacs to exit after processing all the command options.  In  causes Emacs to exit after processing all the command options.  In
200  addition, it disables auto-saving except in buffers for which it has  addition, it disables auto-saving except in buffers for which it has
201  been explicitly requested.  been explicitly requested.
202    
203    @item --script @var{file}
204    @opindex --script
205    Run Emacs in batch mode, like @samp{--batch}, and then read and
206    execute the Lisp code in @var{file}.
207    
208    The normal use of this option is in executable script files that run
209    Emacs.  They can start with this text on the first line
210    
211    @example
212    #!/usr/bin/emacs --script
213    @end example
214    
215    @noindent
216    which will invoke Emacs with @samp{--script} and supply the name of
217    the script file as @var{file}.  Emacs Lisp then treats @samp{#!}  as a
218    comment delimiter.
219    
220  @item -q  @item -q
221  @opindex -q  @opindex -q
222  @itemx --no-init-file  @itemx --no-init-file
# Line 218  the only option that blocks it. Line 239  the only option that blocks it.
239  @item --no-splash  @item --no-splash
240  @opindex --no-splash  @opindex --no-splash
241  @vindex inhibit-startup-message  @vindex inhibit-startup-message
242  Do not display a splash screen on startup; this is equivlaent to  Do not display a splash screen on startup; this is equivalent to
243  setting the variable @code{inhibit-startup-message} to non-nil.  setting the variable @code{inhibit-startup-message} to non-@code{nil}.
244    
245  @item -u @var{user}  @item -u @var{user}
246  @opindex -u  @opindex -u
# Line 331  software) inherit the environment from E Line 352  software) inherit the environment from E
352  @findex getenv  @findex getenv
353    Inside Emacs, the command @kbd{M-x getenv} gets the value of an    Inside Emacs, the command @kbd{M-x getenv} gets the value of an
354  environment variable.  @kbd{M-x setenv} sets a variable in the Emacs  environment variable.  @kbd{M-x setenv} sets a variable in the Emacs
355  environment.  The way to set environment variables outside of Emacs  environment.  (Environment variable substitutions with @samp{$} work
356  depends on the operating system, and especially the shell that you are  in the value just as in file names; see @ref{File Names with $}.)
357  using.  For example, here's how to set the environment variable  
358  @env{ORGANIZATION} to @samp{not very much} using Bash:    The way to set environment variables outside of Emacs depends on the
359    operating system, and especially the shell that you are using.  For
360    example, here's how to set the environment variable @env{ORGANIZATION}
361    to @samp{not very much} using Bash:
362    
363  @example  @example
364  export ORGANIZATION="not very much"  export ORGANIZATION="not very much"
# Line 347  and here's how to do it in csh or tcsh: Line 371  and here's how to do it in csh or tcsh:
371  setenv ORGANIZATION "not very much"  setenv ORGANIZATION "not very much"
372  @end example  @end example
373    
374    When Emacs is uses the X Window System, it inherits the use    When Emacs is using the X Window System, various environment
375  of a large number of environment variables from the X libraries.  See  variables that control X work for Emacs as well.  See the X
376  the X documentation for more information.  documentation for more information.
377    
378  @menu  @menu
379  * General Variables::   Environment variables that all versions of Emacs use.  * General Variables::   Environment variables that all versions of Emacs use.
380  * Misc Variables::      Certain system-specific variables.  * Misc Variables::      Certain system-specific variables.
381    * MS-Windows Registry:: An alternative to the environment on MS-Windows.
382  @end menu  @end menu
383    
384  @node General Variables  @node General Variables
# Line 404  The location of the user's files in the Line 429  The location of the user's files in the
429  expansion of file names starting with a tilde (@file{~}).  On MS-DOS, it  expansion of file names starting with a tilde (@file{~}).  On MS-DOS, it
430  defaults to the directory from which Emacs was started, with @samp{/bin}  defaults to the directory from which Emacs was started, with @samp{/bin}
431  removed from the end if it was present.  On Windows, the default value  removed from the end if it was present.  On Windows, the default value
432  of @code{HOME} is @file{C:/}, the root directory of drive @file{C:}.  of @env{HOME} is @file{C:/}, the root directory of drive @file{C:}.
433  @item HOSTNAME  @item HOSTNAME
434  The name of the machine that Emacs is running on.  The name of the machine that Emacs is running on.
435  @item INCPATH  @item INCPATH
436  A colon-separated list of directories.  Used by the @code{complete} package  A colon-separated list of directories.  Used by the @code{complete} package
437  to search for files.  to search for files.
438  @item INFOPATH  @item INFOPATH
# Line 430  variables is not set, the category defau Line 455  variables is not set, the category defau
455  @env{LANG} is not set.  But if @env{LC_ALL} is specified, it overrides  @env{LANG} is not set.  But if @env{LC_ALL} is specified, it overrides
456  the settings of all the other locale environment variables.  the settings of all the other locale environment variables.
457    
458  The value of the LC_CTYPE category is  On MS-Windows, if @env{LANG} is not already set in the environment
459    when Emacs starts, Emacs sets it based on the system-wide default
460    language, which you can set in the @samp{Regional Settings} Control Panel
461    on some versions of MS-Windows.
462    
463    The value of the @env{LC_CTYPE} category is
464  matched against entries in @code{locale-language-names},  matched against entries in @code{locale-language-names},
465  @code{locale-charset-language-names}, and  @code{locale-charset-language-names}, and
466  @code{locale-preferred-coding-systems}, to select a default language  @code{locale-preferred-coding-systems}, to select a default language
# Line 465  Used by the Gnus package. Line 495  Used by the Gnus package.
495  @item SHELL  @item SHELL
496  The name of an interpreter used to parse and execute programs run from  The name of an interpreter used to parse and execute programs run from
497  inside Emacs.  inside Emacs.
498  @cindex background mode, on @code{xterm}  @item SMTPSERVER
499    The name of the outgoing mail server.  Used by the SMTP library
500    (@pxref{Sending mail via SMTP,,,smtpmail}).
501    @cindex background mode, on @command{xterm}
502  @item TERM  @item TERM
503  The type of the terminal that Emacs is using.  This variable must be  The type of the terminal that Emacs is using.  This variable must be
504  set unless Emacs is run in batch mode.  On MS-DOS, it defaults to  set unless Emacs is run in batch mode.  On MS-DOS, it defaults to
505  @samp{internal}, which specifies a built-in terminal emulation that  @samp{internal}, which specifies a built-in terminal emulation that
506  handles the machine's own display.  If the value of @env{TERM} indicates  handles the machine's own display.  If the value of @env{TERM} indicates
507  that Emacs runs in non-windowed mode from @code{xterm} or a similar  that Emacs runs in non-windowed mode from @command{xterm} or a similar
508  terminal emulator, the background mode defaults to @samp{light}, and  terminal emulator, the background mode defaults to @samp{light}, and
509  Emacs will choose colors that are appropriate for a light background.  Emacs will choose colors that are appropriate for a light background.
510  @item TERMCAP  @item TERMCAP
# Line 482  terminal specified by the @env{TERM} var Line 515  terminal specified by the @env{TERM} var
515  Used by the Emerge package as a prefix for temporary files.  Used by the Emerge package as a prefix for temporary files.
516  @item TZ  @item TZ
517  This specifies the current time zone and possibly also daylight  This specifies the current time zone and possibly also daylight
518  saving time information.  On MS-DOS, if @code{TZ} is not set in the  saving time information.  On MS-DOS, if @env{TZ} is not set in the
519  environment when Emacs starts, Emacs defines a default value as  environment when Emacs starts, Emacs defines a default value as
520  appropriate for the country code returned by DOS.  On MS-Windows, Emacs  appropriate for the country code returned by DOS.  On MS-Windows, Emacs
521  does not use @code{TZ} at all.  does not use @env{TZ} at all.
522  @item USER  @item USER
523  The user's login name.  See also @env{LOGNAME}.  On MS-DOS, this  The user's login name.  See also @env{LOGNAME}.  On MS-DOS, this
524  defaults to @samp{root}.  defaults to @samp{root}.
# Line 540  actually used. Line 573  actually used.
573    
574  @item WINDOW_GFX  @item WINDOW_GFX
575  Used when initializing the Sun windows system.  Used when initializing the Sun windows system.
576    
577    @item PRELOAD_WINSOCK
578    On MS-Windows, if you set this variable, Emacs will load and initialize
579    the network library at startup, instead of waiting until the first
580    time it is required.
581    
582    @item emacs_dir
583    On MS-Windows, @env{emacs_dir} is a special environment variable, which
584    indicates the full path of the directory in which Emacs is installed.
585    If Emacs is installed in the standard directory structure, it
586    calculates this value automatically.  It is not much use setting this
587    variable yourself unless your installation is non-standard, since
588    unlike other environment variables, it will be overridden by Emacs at
589    startup.  When setting other environment variables, such as
590    @env{EMACSLOADPATH}, you may find it useful to use @env{emacs_dir}
591    rather than hard-coding an absolute path.  This allows multiple
592    versions of Emacs to share the same environment variable settings, and
593    it allows you to move the Emacs installation directory, without
594    changing any environment or registry settings.
595  @end table  @end table
596    
597    @node MS-Windows Registry
598    @appendixsubsec The MS-Windows System Registry
599    @pindex addpm, MS-Windows installation program
600    @cindex registry, setting environment variables and resources on MS-Windows
601    
602    On MS-Windows, the installation program @command{addpm.exe} adds values
603    for @env{emacs_dir}, @env{EMACSLOADPATH}, @env{EMACSDATA},
604    @env{EMACSPATH}, @env{EMACSDOC}, @env{SHELL} and @env{TERM} to the
605    @file{HKEY_LOCAL_MACHINE} section of the system registry, under
606    @file{/Software/GNU/Emacs}.  It does this because there is no standard
607    place to set environment variables across different versions of
608    Windows.  Running @command{addpm.exe} is no longer strictly
609    necessary in recent versions of Emacs, but if you are upgrading from
610    an older version, running @command{addpm.exe} ensures that you do not have
611    older registry entries from a previous installation, which may not be
612    compatible with the latest version of Emacs.
613    
614    When Emacs starts, as well as checking the environment, it also checks
615    the System Registry for those variables and for @env{HOME}, @env{LANG}
616    and @env{PRELOAD_WINSOCK}.
617    
618    To determine the value of those variables, Emacs goes through the
619    following procedure.  First, the environment is checked.  If the
620    variable is not found there, Emacs looks for registry keys by that
621    name under @file{/Software/GNU/Emacs}; first in the
622    @file{HKEY_CURRENT_USER} section of the registry, and if not found
623    there, in the @file{HKEY_LOCAL_MACHINE} section.  Finally, if Emacs
624    still cannot determine the values, compiled-in defaults are used.
625    
626    In addition to the environment variables above, you can also add many
627    of the settings which on X belong in the @file{.Xdefaults} file
628    (@pxref{X Resources}) to the @file{/Software/GNU/Emacs} registry key.
629    Settings you add to the @file{HKEY_LOCAL_MACHINE} section will affect
630    all users of the machine.  Settings you add to the
631    @file{HKEY_CURRENT_USER} section will only affect you, and will
632    override machine wide settings.
633    
634  @node Display X  @node Display X
635  @appendixsec Specifying the Display Name  @appendixsec Specifying the Display Name
636  @cindex display name (X Window System)  @cindex display name (X Window System)
637  @cindex @env{DISPLAY} environment variable  @cindex @env{DISPLAY} environment variable
638    
# Line 594  Xlib:  connection to "glasperle:0.0" ref Line 683  Xlib:  connection to "glasperle:0.0" ref
683  @end smallexample  @end smallexample
684    
685  @noindent  @noindent
686  You might be able to overcome this problem by using the @code{xhost}  You might be able to overcome this problem by using the @command{xhost}
687  command on the local system to give permission for access from your  command on the local system to give permission for access from your
688  remote machine.  remote machine.
689    
# Line 690  Normally you should use @samp{iso8859-1} Line 779  Normally you should use @samp{iso8859-1}
779    You will probably want to use a fixed-width default font---that is,    You will probably want to use a fixed-width default font---that is,
780  a font in which all characters have the same width.  Any font with  a font in which all characters have the same width.  Any font with
781  @samp{m} or @samp{c} in the @var{spacing} field of the long name is a  @samp{m} or @samp{c} in the @var{spacing} field of the long name is a
782  fixed-width font.  Here's how to use the @code{xlsfonts} program to  fixed-width font.  Here's how to use the @command{xlsfonts} program to
783  list all the fixed-width fonts available on your system:  list all the fixed-width fonts available on your system:
784    
785  @example  @example
# Line 700  xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*' Line 789  xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*'
789  @end example  @end example
790    
791  @noindent  @noindent
792  To see what a particular font looks like, use the @code{xfd} command.  To see what a particular font looks like, use the @command{xfd} command.
793  For example:  For example:
794    
795  @example  @example
# Line 827  text-only terminals as well as on window Line 916  text-only terminals as well as on window
916  @cindex specifying fullscreen for Emacs frame  @cindex specifying fullscreen for Emacs frame
917    
918    Here is a list of the command-line options for specifying size and    Here is a list of the command-line options for specifying size and
919  position of the initial Emacs frame:  position of the initial Emacs frame:
920    
921  @table @samp  @table @samp
922  @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}  @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
923  @opindex -g  @opindex -g
924  Specify window size @var{width} and @var{height} (measured in character  Specify the size @var{width} and @var{height} (measured in character
925  columns and lines), and positions @var{xoffset} and @var{yoffset}  columns and lines), and positions @var{xoffset} and @var{yoffset}
926  (measured in pixels).  (measured in pixels).  This applies to all frames.
927    
928  @item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}  @item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
929  @opindex --geometry  @opindex --geometry
# Line 873  screen, and a minus sign there indicates Line 962  screen, and a minus sign there indicates
962  The values @var{xoffset} and @var{yoffset} may themselves be positive or  The values @var{xoffset} and @var{yoffset} may themselves be positive or
963  negative, but that doesn't change their meaning, only their direction.  negative, but that doesn't change their meaning, only their direction.
964    
965    Emacs uses the same units as @code{xterm} does to interpret the geometry.    Emacs uses the same units as @command{xterm} does to interpret the geometry.
966  The @var{width} and @var{height} are measured in characters, so a large font  The @var{width} and @var{height} are measured in characters, so a large font
967  creates a larger frame than a small font.  (If you specify a proportional  creates a larger frame than a small font.  (If you specify a proportional
968  font, Emacs uses its maximum bounds width as the width unit.)  The  font, Emacs uses its maximum bounds width as the width unit.)  The
969  @var{xoffset} and @var{yoffset} are measured in pixels.  @var{xoffset} and @var{yoffset} are measured in pixels.
970    
   Since the mode line and the echo area occupy the last 2 lines of the  
 frame, the height of the initial text window is 2 less than the height  
 specified in your geometry.  In non-X-toolkit versions of Emacs, the  
 menu bar also takes one line of the specified number.  But in the X  
 toolkit version, the menu bar is additional and does not count against  
 the specified height.  The tool bar, if present, is also additional.  
   
971    You do not have to specify all of the fields in the geometry    You do not have to specify all of the fields in the geometry
972  specification.  specification.  If you omit both @var{xoffset} and @var{yoffset}, the
973    window manager decides where to put the Emacs frame, possibly by
974    If you omit both @var{xoffset} and @var{yoffset}, the window manager  letting you place it with the mouse.  For example, @samp{164x55}
975  decides where to put the Emacs frame, possibly by letting you place  specifies a window 164 columns wide, enough for two ordinary width
976  it with the mouse.  For example, @samp{164x55} specifies a window 164  windows side by side, and 55 lines tall.
 columns wide, enough for two ordinary width windows side by side, and 55  
 lines tall.  
977    
978    The default width for Emacs is 80 characters and the default height is    The default width for Emacs is 80 characters and the default height is
979  40 lines.  You can omit either the width or the height or both.  If  40 lines.  You can omit either the width or the height or both.  If
# Line 912  which means both sizes are omitted.  Thu Line 992  which means both sizes are omitted.  Thu
992  @file{.Xdefaults} file, and then override selected fields with a  @file{.Xdefaults} file, and then override selected fields with a
993  @samp{--geometry} option.  @samp{--geometry} option.
994    
995      Since the mode line and the echo area occupy the last 2 lines of the
996    frame, the height of the initial text window is 2 less than the height
997    specified in your geometry.  In non-X-toolkit versions of Emacs, the
998    menu bar also takes one line of the specified number.  But in the X
999    toolkit version, the menu bar is additional and does not count against
1000    the specified height.  The tool bar, if present, is also additional.
1001    
1002      Enabling or disabling the menu bar or tool bar alters the amount of
1003    space available for ordinary text.  Therefore, if Emacs starts up with
1004    a tool bar (which is the default), and handles the geometry
1005    specification assuming there is a tool bar, and then your
1006    @file{~/.emacs} file disables the tool bar, you will end up with a
1007    frame geometry different from what you asked for.  To get the intended
1008    size with no tool bar, use an X resource to specify ``no tool bar''
1009    (@pxref{Table of Resources});then Emacs will already know there's no
1010    tool bar when it processes the specified geometry.
1011    
1012   When using one of @samp{--fullscreen}, @samp{--fullwidth} or    When using one of @samp{--fullscreen}, @samp{--fullwidth} or
1013  @samp{--fullheight} there may be some space around the frame  @samp{--fullheight} there may be some space around the frame
1014  anyway.  That is because Emacs rounds the sizes so they are an  anyway.  That is because Emacs rounds the sizes so they are an
1015  even number of character heights and widths.  even number of character heights and widths.

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.63.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26