aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-11-22 11:36:36 +0000
committerRichard M. Stallman2001-11-22 11:36:36 +0000
commit82f6e63d7c21a51e1b329305b2ea905fdfd906ca (patch)
tree384075147bd31e91792972a8a3f07f38b1345775
parentae4000f161c83694f0d9ff953d326eb5abcf9d75 (diff)
downloademacs-82f6e63d7c21a51e1b329305b2ea905fdfd906ca.tar.gz
emacs-82f6e63d7c21a51e1b329305b2ea905fdfd906ca.zip
Move some of the nodes back to cmdargs.texi--they actually describe options.
Break out new nodes Table of Resources and Face Resources.
-rw-r--r--man/xresources.texi470
1 files changed, 29 insertions, 441 deletions
diff --git a/man/xresources.texi b/man/xresources.texi
index 02c0dd3e59a..39aae53417b 100644
--- a/man/xresources.texi
+++ b/man/xresources.texi
@@ -2,450 +2,23 @@
2@c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc. 2@c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions. 3@c See file emacs.texi for copying conditions.
4@node X Resources, Antinews, Command Arguments, Top 4@node X Resources, Antinews, Command Arguments, Top
5@appendix X Resources 5@appendix X Options and Resources
6 6
7 Some aspects of Emacs behavior can be customized using X resources, 7 You can customize some X-related aspects of Emacs behavior using X
8as is usual for programs that use X. X resources are the only way to 8resources, as is usual for programs that use X. X resources are the
9customize tooltip windows and LessTif menus, since the libraries that 9only way to customize tooltip windows and LessTif menus, since the
10implement them don't provide for customization through Emacs. This 10libraries that implement them don't provide for customization through
11appendix describes the X resources that Emacs recognizes and what they 11Emacs. This appendix describes the X resources that Emacs recognizes
12mean. 12and how to use them.
13
14 One way to experiment with the effect of different resource settings
15is to use the @code{editres} program. Select @samp{Get Tree} from the
16@samp{Commands} menu, then click on an Emacs frame. This will display
17a tree showing the structure of X toolkit widgets used in an Emacs
18frame. Select one of them, such as @samp{menubar}, then select
19@samp{Show Resource Box} from the @samp{Commands} menu. This displays
20a list of all the meaningful X resources and allows you to edit them.
21Changes take effect immediately if you click on the @samp{Apply} button.
22 13
23@menu 14@menu
24* Display X:: Changing the default display and using remote login. 15* Resources:: Using X resources with Emacs (in general).
25* Font X:: Choosing a font for text, under X. 16* Table of Resources:: Table of specific X resources that affect Emacs.
26* Colors X:: Choosing colors, under X. 17* Face Resources:: X resources for customizing faces.
27* Window Size X:: Start-up window size, under X.
28* Borders X:: Internal and external borders, under X.
29* Title X:: Specifying the initial frame's title.
30* Icons X:: Choosing what sort of icon to use, under X.
31* Resources X:: Advanced use of classes and resources, under X.
32* Lucid Resources:: X resources for Lucid menus. 18* Lucid Resources:: X resources for Lucid menus.
33* LessTif Resources:: X resources for LessTif and Motif menus. 19* LessTif Resources:: X resources for LessTif and Motif menus.
34@end menu 20@end menu
35 21
36@node Display X
37@appendixsec Specifying the Display Name
38@cindex display name (X Window System)
39@cindex @env{DISPLAY} environment variable
40
41 The environment variable @env{DISPLAY} tells all X clients, including
42Emacs, where to display their windows. Its value is set by default
43in ordinary circumstances, when you start an X server and run jobs
44locally. Occasionally you may need to specify the display yourself; for
45example, if you do a remote login and want to run a client program
46remotely, displaying on your local screen.
47
48 With Emacs, the main reason people change the default display is to
49let them log into another system, run Emacs on that system, but have the
50window displayed at their local terminal. You might need to log in
51to another system because the files you want to edit are there, or
52because the Emacs executable file you want to run is there.
53
54 The syntax of the @env{DISPLAY} environment variable is
55@samp{@var{host}:@var{display}.@var{screen}}, where @var{host} is the
56host name of the X Window System server machine, @var{display} is an
57arbitrarily-assigned number that distinguishes your server (X terminal)
58from other servers on the same machine, and @var{screen} is a
59rarely-used field that allows an X server to control multiple terminal
60screens. The period and the @var{screen} field are optional. If
61included, @var{screen} is usually zero.
62
63 For example, if your host is named @samp{glasperle} and your server is
64the first (or perhaps the only) server listed in the configuration, your
65@env{DISPLAY} is @samp{glasperle:0.0}.
66
67 You can specify the display name explicitly when you run Emacs, either
68by changing the @env{DISPLAY} variable, or with the option @samp{-d
69@var{display}} or @samp{--display=@var{display}}. Here is an example:
70
71@smallexample
72emacs --display=glasperle:0 &
73@end smallexample
74
75 You can inhibit the direct use of the window system and GUI with the
76@samp{-nw} option. It tells Emacs to display using ordinary ASCII on
77its controlling terminal. This is also an initial option.
78
79 Sometimes, security arrangements prevent a program on a remote system
80from displaying on your local system. In this case, trying to run Emacs
81produces messages like this:
82
83@smallexample
84Xlib: connection to "glasperle:0.0" refused by server
85@end smallexample
86
87@noindent
88You might be able to overcome this problem by using the @code{xhost}
89command on the local system to give permission for access from your
90remote machine.
91
92@node Font X
93@appendixsec Font Specification Options
94@cindex font name (X Window System)
95
96 By default, Emacs displays text in the font named @samp{9x15}, which
97makes each character nine pixels wide and fifteen pixels high. You can
98specify a different font on your command line through the option
99@samp{-fn @var{name}} (or @samp{--font}, which is an alias for
100@samp{-fn}).
101
102@table @samp
103@item -fn @var{name}
104@opindex -fn
105@itemx --font=@var{name}
106@opindex --font
107@cindex specify default font from the command line
108Use font @var{name} as the default font.
109@end table
110
111 Under X, each font has a long name which consists of eleven words or
112numbers, separated by dashes. Some fonts also have shorter
113nicknames---@samp{9x15} is such a nickname. You can use either kind of
114name. You can use wildcard patterns for the font name; then Emacs lets
115X choose one of the fonts that match the pattern. Here is an example,
116which happens to specify the font whose nickname is @samp{6x13}:
117
118@smallexample
119emacs -fn "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" &
120@end smallexample
121
122@noindent
123You can also specify the font in your @file{.Xdefaults} file:
124
125@smallexample
126emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
127@end smallexample
128
129 A long font name has the following form:
130
131@smallexample
132-@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
133@dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
134@end smallexample
135
136@table @var
137@item maker
138This is the name of the font manufacturer.
139@item family
140This is the name of the font family---for example, @samp{courier}.
141@item weight
142This is normally @samp{bold}, @samp{medium} or @samp{light}. Other
143words may appear here in some font names.
144@item slant
145This is @samp{r} (roman), @samp{i} (italic), @samp{o} (oblique),
146@samp{ri} (reverse italic), or @samp{ot} (other).
147@item widthtype
148This is normally @samp{condensed}, @samp{extended}, @samp{semicondensed}
149or @samp{normal}. Other words may appear here in some font names.
150@item style
151This is an optional additional style name. Usually it is empty---most
152long font names have two hyphens in a row at this point.
153@item pixels
154This is the font height, in pixels.
155@item height
156This is the font height on the screen, measured in tenths of a printer's
157point---approximately 1/720 of an inch. In other words, it is the point
158size of the font, times ten. For a given vertical resolution,
159@var{height} and @var{pixels} are proportional; therefore, it is common
160to specify just one of them and use @samp{*} for the other.
161@item horiz
162This is the horizontal resolution, in pixels per inch, of the screen for
163which the font is intended.
164@item vert
165This is the vertical resolution, in pixels per inch, of the screen for
166which the font is intended. Normally the resolution of the fonts on
167your system is the right value for your screen; therefore, you normally
168specify @samp{*} for this and @var{horiz}.
169@item spacing
170This is @samp{m} (monospace), @samp{p} (proportional) or @samp{c}
171(character cell).
172@item width
173This is the average character width, in pixels, multiplied by ten.
174@item charset
175This is the character set that the font depicts.
176Normally you should use @samp{iso8859-1}.
177@end table
178
179@cindex listing system fonts
180 You will probably want to use a fixed-width default font---that is,
181a font in which all characters have the same width. Any font with
182@samp{m} or @samp{c} in the @var{spacing} field of the long name is a
183fixed-width font. Here's how to use the @code{xlsfonts} program to
184list all the fixed-width fonts available on your system:
185
186@example
187xlsfonts -fn '*x*' | egrep "^[0-9]+x[0-9]+"
188xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*'
189xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*'
190@end example
191
192@noindent
193To see what a particular font looks like, use the @code{xfd} command.
194For example:
195
196@example
197xfd -fn 6x13
198@end example
199
200@noindent
201displays the entire font @samp{6x13}.
202
203 While running Emacs, you can set the font of the current frame
204(@pxref{Frame Parameters}) or for a specific kind of text
205(@pxref{Faces}).
206
207@node Colors X
208@appendixsec Window Color Options
209@cindex color of window
210@cindex text colors, from command line
211
212@findex list-colors-display
213@cindex available colors
214 On a color display, you can specify which color to use for various
215parts of the Emacs display. To find out what colors are available on
216your system, type @kbd{M-x list-colors-display}, or press
217@kbd{C-Mouse-2} and select @samp{Display Colors} from the pop-up menu.
218If you do not specify colors, on windowed displays the default for the
219background is white and the default for all other colors is black. On a
220monochrome display, the foreground is black, the background is white,
221and the border is gray if the display supports that. On terminals, the
222background is usually black and the foreground is white.
223
224 Here is a list of the command-line options for specifying colors:
225
226@table @samp
227@item -fg @var{color}
228@opindex -fg
229@itemx --foreground-color=@var{color}
230@opindex --foreground-color
231@cindex foreground color, command-line argument
232Specify the foreground color. @var{color} should be a standard color
233name, or a numeric specification of the color's red, green, and blue
234components as in @samp{#4682B4} or @samp{RGB:46/82/B4}.
235@item -bg @var{color}
236@opindex -bg
237@itemx --background-color=@var{color}
238@opindex --background-color
239@cindex background color, command-line argument
240Specify the background color.
241@item -bd @var{color}
242@opindex -bd
243@itemx --border-color=@var{color}
244@opindex --border-color
245@cindex border color, command-line argument
246Specify the color of the border of the X window.
247@item -cr @var{color}
248@opindex -cr
249@itemx --cursor-color=@var{color}
250@opindex --cursor-color
251@cindex cursor color, command-line argument
252Specify the color of the Emacs cursor which indicates where point is.
253@item -ms @var{color}
254@opindex -ms
255@itemx --mouse-color=@var{color}
256@opindex --mouse-color
257@cindex mouse pointer color, command-line argument
258Specify the color for the mouse cursor when the mouse is in the Emacs window.
259@item -r
260@opindex -r
261@itemx -rv
262@opindex -rv
263@itemx --reverse-video
264@opindex --reverse-video
265@cindex reverse video, command-line argument
266Reverse video---swap the foreground and background colors.
267@end table
268
269 For example, to use a coral mouse cursor and a slate blue text cursor,
270enter:
271
272@example
273emacs -ms coral -cr 'slate blue' &
274@end example
275
276 You can reverse the foreground and background colors through the
277@samp{-rv} option or with the X resource @samp{reverseVideo}.
278
279 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on
280text-only terminals as well as on window systems.
281
282@node Window Size X
283@appendixsec Options for Window Geometry
284@cindex geometry of Emacs window
285@cindex position and size of Emacs frame
286@cindex width and height of Emacs frame
287
288 The @samp{--geometry} option controls the size and position of the
289initial Emacs frame. Here is the format for specifying the window
290geometry:
291
292@table @samp
293@item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
294@opindex -g
295Specify window size @var{width} and @var{height} (measured in character
296columns and lines), and positions @var{xoffset} and @var{yoffset}
297(measured in pixels).
298
299@item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
300@opindex --geometry
301This is another way of writing the same thing.
302@end table
303
304@noindent
305@code{@r{@{}+-@r{@}}} means either a plus sign or a minus sign. A plus
306sign before @var{xoffset} means it is the distance from the left side of
307the screen; a minus sign means it counts from the right side. A plus
308sign before @var{yoffset} means it is the distance from the top of the
309screen, and a minus sign there indicates the distance from the bottom.
310The values @var{xoffset} and @var{yoffset} may themselves be positive or
311negative, but that doesn't change their meaning, only their direction.
312
313 Emacs uses the same units as @code{xterm} does to interpret the geometry.
314The @var{width} and @var{height} are measured in characters, so a large font
315creates a larger frame than a small font. (If you specify a proportional
316font, Emacs uses its maximum bounds width as the width unit.) The
317@var{xoffset} and @var{yoffset} are measured in pixels.
318
319 Since the mode line and the echo area occupy the last 2 lines of the
320frame, the height of the initial text window is 2 less than the height
321specified in your geometry. In non-X-toolkit versions of Emacs, the
322menu bar also takes one line of the specified number. But in the X
323toolkit version, the menu bar is additional and does not count against
324the specified height. The tool bar, if present, is also additional.
325
326 You do not have to specify all of the fields in the geometry
327specification.
328
329 If you omit both @var{xoffset} and @var{yoffset}, the window manager
330decides where to put the Emacs frame, possibly by letting you place
331it with the mouse. For example, @samp{164x55} specifies a window 164
332columns wide, enough for two ordinary width windows side by side, and 55
333lines tall.
334
335 The default width for Emacs is 80 characters and the default height is
33640 lines. You can omit either the width or the height or both. If
337you start the geometry with an integer, Emacs interprets it as the
338width. If you start with an @samp{x} followed by an integer, Emacs
339interprets it as the height. Thus, @samp{81} specifies just the width;
340@samp{x45} specifies just the height.
341
342 If you start with @samp{+} or @samp{-}, that introduces an offset,
343which means both sizes are omitted. Thus, @samp{-3} specifies the
344@var{xoffset} only. (If you give just one offset, it is always
345@var{xoffset}.) @samp{+3-3} specifies both the @var{xoffset} and the
346@var{yoffset}, placing the frame near the bottom left of the screen.
347
348 You can specify a default for any or all of the fields in
349@file{.Xdefaults} file, and then override selected fields with a
350@samp{--geometry} option.
351
352@node Borders X
353@appendixsec Internal and External Borders
354@cindex borders (X Window System)
355
356 An Emacs frame has an internal border and an external border. The
357internal border is an extra strip of the background color around the
358text portion of the frame. Emacs itself draws the internal border.
359The external border is added by the window manager outside the frame;
360depending on the window manager you use, it may contain various boxes
361you can click on to move or iconify the window.
362
363@table @samp
364@item -ib @var{width}
365@opindex -ib
366@itemx --internal-border=@var{width}
367@opindex --internal-border
368@cindex border width, command-line argument
369Specify @var{width} as the width of the internal border, in pixels.
370
371@item -bw @var{width}
372@opindex -bw
373@itemx --border-width=@var{width}
374@opindex --border-width
375Specify @var{width} as the width of the main border, in pixels.
376@end table
377
378 When you specify the size of the frame, that does not count the
379borders. The frame's position is measured from the outside edge of the
380external border.
381
382 Use the @samp{-ib @var{n}} option to specify an internal border
383@var{n} pixels wide. The default is 1. Use @samp{-bw @var{n}} to
384specify the width of the external border (though the window manager may
385not pay attention to what you specify). The default width of the
386external border is 2.
387
388@node Title X
389@appendixsec Frame Titles
390
391 An Emacs frame may or may not have a specified title. The frame
392title, if specified, appears in window decorations and icons as the
393name of the frame. If an Emacs frame has no specified title, the
394default title has the form @samp{@var{invocation-name}@@@var{machine}}
395(if there is only one frame) or the selected window's buffer name (if
396there is more than one frame).
397
398 You can specify a title for the initial Emacs frame with a command
399line option:
400
401@table @samp
402@item -title @var{title}
403@opindex --title
404@itemx --title=@var{title}
405@itemx -T @var{title}
406@opindex -T
407@cindex frame title, command-line argument
408Specify @var{title} as the title for the initial Emacs frame.
409@end table
410
411 The @samp{--name} option (@pxref{Resources X}) also specifies the title
412for the initial Emacs frame.
413
414@node Icons X
415@appendixsec Icons
416@cindex icons (X Window System)
417
418 Most window managers allow the user to ``iconify'' a frame, removing
419it from sight, and leaving a small, distinctive ``icon'' window in its
420place. Clicking on the icon window makes the frame itself appear again.
421If you have many clients running at once, you can avoid cluttering up
422the screen by iconifying most of the clients.
423
424@table @samp
425@item -i
426@opindex -i
427@itemx --icon-type
428@opindex --icon-type
429@cindex Emacs icon, a gnu
430Use a picture of a gnu as the Emacs icon.
431
432@item -iconic
433@opindex --iconic
434@itemx --iconic
435@cindex start iconified, command-line argument
436Start Emacs in iconified state.
437@end table
438
439 The @samp{-i} or @samp{--icon-type} option tells Emacs to use an icon
440window containing a picture of the GNU gnu. If omitted, Emacs lets the
441window manager choose what sort of icon to use---usually just a small
442rectangle containing the frame's title.
443
444 The @samp{-iconic} option tells Emacs to begin running as an icon,
445rather than showing a frame right away. In this situation, the icon
446is the only indication that Emacs has started; the text frame doesn't
447appear until you deiconify it.
448
449@node Resources X 22@node Resources X
450@appendixsec X Resources 23@appendixsec X Resources
451@cindex resources 24@cindex resources
@@ -551,8 +124,20 @@ You can also use @samp{#include "@var{filename}"} to include a file full
551of resource specifications. Resource values specified with @samp{-xrm} 124of resource specifications. Resource values specified with @samp{-xrm}
552take precedence over all other resource specifications. 125take precedence over all other resource specifications.
553 126
554 The following table lists the resource names that designate options 127 One way to experiment with the effect of different resource settings
555for Emacs, each with the class that it belongs to: 128is to use the @code{editres} program. Select @samp{Get Tree} from the
129@samp{Commands} menu, then click on an Emacs frame. This will display
130a tree showing the structure of X toolkit widgets used in an Emacs
131frame. Select one of them, such as @samp{menubar}, then select
132@samp{Show Resource Box} from the @samp{Commands} menu. This displays
133a list of all the meaningful X resources and allows you to edit them.
134Changes take effect immediately if you click on the @samp{Apply} button.
135
136@node Table of Resources
137@appendixsec Table of X Resources for Emacs
138
139 This table lists the resource names that designate options for
140Emacs, each with the class that it belongs to:
556 141
557@table @asis 142@table @asis
558@item @code{background} (class @code{Background}) 143@item @code{background} (class @code{Background})
@@ -652,8 +237,11 @@ Give frames scroll bars if @samp{on}; don't have scroll bars if
652@samp{off}. 237@samp{off}.
653@end table 238@end table
654 239
655 Here are resources for controlling the appearance of particular faces 240@node Face Resources
656(@pxref{Faces}): 241@appendixsec X Resources for Faces
242
243 You can also use resources to customize the appearance of particular
244faces (@pxref{Faces}):
657 245
658@table @code 246@table @code
659@item @var{face}.attributeFont 247@item @var{face}.attributeFont