-->

Previous | Table of Contents | Next

Page 131

USING EMACS WITH X

emacs has been tailored to work well with the X Window System. If you run emacs from under X windows, it will create its own X window to display in. You will probably want to start the editor as a background process so that you can continue using your original window.

emacs can be started with the following X switches:

_rn name Specifies the program name which should be used when looking up defaults in the user's X resources. This must be the first option specified in the command line.
_name name Specifies the name that should be assigned to the emacs window.
-r Display the emacs window in reverse video.
-i Use the "kitchen sink" bitmap icon when iconifying the emacs window.
_font font, _fn font Set the emacs window's font to that specified by font. You will find the various X fonts in the /usr/lib/X11/fonts directory. Note that emacs will only accept fixed width fonts. Under the X11 Release 4 font-naming conventions, any font with the value m or c in the eleventh field of the font name is a fixed width font. Furthermore, fonts whose name are of the form width¥height are generally fixed width, as is the font fixed. See xlsfonts(1) for more information.
When you specify a font, be sure to put a space between the switch and the font name.
_b pixels Set the emacs window's border width to the number of pixels specified by pixels. Defaults to one pixel on each side of the window.
_ib pixels Set the window's internal border width to the number of pixels specified by pixels. Defaults to one pixel of padding on each side of the window.
_geometry geometry Set the emacs window's width, height, and position as specified. The geometry specification is in the standard uformat; see X(1) for more information. The width and height are specified in characters; the default is 80 by 24.
_fg color On color displays, sets the color of the text. See the file /usr/lib/X11/rgb.txt for a list of valid color names.
_bg color On color displays, sets the color of the window's background.
_bd color On color displays, sets the color of the window's border.
_cr color On color displays, sets the color of the window's text cursor.
_ms color On color displays, sets the color of the window's mouse cursor.
_d displayname, _display displayname Create the emacs window on the display specified by displayname. Must be the first option specified in the command line.
_nw Tells emacs not to use its special interface to X. If you use this switch when invoking emacs from an xterm(1) window, display is done in that window. This must be the first option specified in the command line.

You can set X default values for your emacs windows in your Xresources file; see xrdb(1). Use the following format:


emacs.keyword:value

where value specifies the default value of keyword. emacs lets you set default values for the following keywords:

font (class Font) Sets the window's text font.
reverseVideo (class ReverseVideo) If reverseVideo's value is set to on, the window will be displayed in reverse video.
bitmapIcon (class BitmapIcon) If bitmapIcon's value is set to on, the window will iconify into the "kitchen sink."
borderWidth (class BorderWidth) Sets the window's border width in pixels.
internalBorder (class BorderWidth) Sets the window's internal border width in pixels.
foreground (class Foreground) For color displays, sets the window's text color.
background (class Background) For color displays, sets the window's background color.
borderColor (class BorderColor) For color displays, sets the color of the window's border.

Previous | Table of Contents | Next