manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

F.3 Environment Variables and Command Line Arguments.

On Mac OS X, when Emacs is run in a terminal, it inherits the values of environment variables from the shell from which it is invoked. However, when it is run from the Finder as a GUI application, it only inherits environment variable values defined in the file ‘~/.MacOSX/environment.plist’ that affects all the applications invoked from the Finder or the open command.

Command line arguments are specified like

/Applications/ -g 80x25 &

if Emacs is installed at ‘/Applications/’. If Emacs is invoked like this, then it also inherits the values of environment variables from the shell from which it is invoked.

On Mac OS Classic, environment variables and command line arguments for Emacs can be set by modifying the ‘STR#’ resources 128 and 129, respectively. A common environment variable that one may want to set is ‘HOME’.

The way to set an environment variable is by adding a string of the form


to resource ‘STR#’ number 128 using ResEdit. To set up the program to use unibyte characters exclusively, for example, add the string


Although Emacs on Mac does not support X resources (see section X Options and Resources) directly, one can use the Preferences system in place of X resources. For example, adding the line

Emacs.cursorType: bar

to ‘~/.Xresources’ in X11 corresponds to the execution of

defaults write org.gnu.Emacs Emacs.cursorType bar

on Mac OS X. One can use boolean or numeric values as well as string values as follows:

defaults write org.gnu.Emacs Emacs.toolBar -bool false
defaults write org.gnu.Emacs Emacs.lineSpacing -int 3

Try M-x man RET defaults RET for the usage of the defaults command. Alternatively, if you have Developer Tools installed on Mac OS X, you can use Property List Editor to edit the file ‘~/Library/Preferences/org.gnu.Emacs.plist’.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© 2000-2024
Individual documents may contain additional copyright information.