1 This is ../info/xemacs-faq.info, produced by makeinfo version 4.0b from
4 INFO-DIR-SECTION XEmacs Editor
6 * FAQ: (xemacs-faq). XEmacs FAQ.
10 File: xemacs-faq.info, Node: Q3.1.7, Next: Q3.1.8, Prev: Q3.1.6, Up: Customization
12 Q3.1.7: `xemacs -name junk' doesn't work?
13 -----------------------------------------
15 When I run `xterm -name junk', I get an xterm whose class name
16 according to xprop, is `junk'. This is the way it's supposed to work,
17 I think. When I run `xemacs -name junk' the class name is not set to
18 `junk'. It's still `emacs'. What does `xemacs -name' really do? The
19 reason I ask is that my window manager (fvwm) will make a window sticky
20 and I use XEmacs to read my mail. I want that XEmacs window to be
21 sticky, without having to use the window manager's function to set the
22 window sticky. What gives?
24 `xemacs -name' sets the application name for the program (that is,
25 the thing which normally comes from `argv[0]'). Using `-name' is the
26 same as making a copy of the executable with that new name. The
27 `WM_CLASS' property on each frame is set to the frame-name, and the
28 application-class. So, if you did `xemacs -name FOO' and then created
29 a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
30 "Emacs")'. However, the resource hierarchy for this widget would be:
32 Name: FOO .shell .container .BAR
33 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
35 instead of the default
37 Name: xemacs.shell .container .emacs
38 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
40 It is arguable that the first element of WM_CLASS should be set to
41 the application-name instead of the frame-name, but I think that's less
42 flexible, since it does not give you the ability to have multiple frames
43 with different WM_CLASS properties. Another possibility would be for
44 the default frame name to come from the application name instead of
45 simply being `emacs'. However, at this point, making that change would
46 be troublesome: it would mean that many users would have to make yet
47 another change to their resource files (since the default frame name
48 would suddenly change from `emacs' to `xemacs', or whatever the
49 executable happened to be named), so we'd rather avoid it.
51 To make a frame with a particular name use:
53 (make-frame '((name . "the-name")))
56 File: xemacs-faq.info, Node: Q3.1.8, Next: Q3.2.1, Prev: Q3.1.7, Up: Customization
58 Q3.1.8: `-iconic' doesn't work.
59 -------------------------------
61 When I start up XEmacs using `-iconic' it doesn't work right. Using
62 `-unmapped' on the command line, and setting the `initiallyUnmapped' X
63 Resource don't seem to help much either...
65 Ben Wing <ben@xemacs.org> writes:
67 Ugh, this stuff is such an incredible mess that I've about given up
68 getting it to work. The principal problem is numerous
69 window-manager bugs...
72 File: xemacs-faq.info, Node: Q3.2.1, Next: Q3.2.2, Prev: Q3.1.8, Up: Customization
74 3.2: Textual Fonts & Colors
75 ===========================
77 Q3.2.1: How can I set color options from `.emacs'?
78 --------------------------------------------------
80 How can I set the most commonly used color options from my `.emacs'
81 instead of from my `.Xdefaults'?
85 (set-face-background 'default "bisque") ; frame background
86 (set-face-foreground 'default "black") ; normal text
87 (set-face-background 'zmacs-region "red") ; When selecting w/
89 (set-face-foreground 'zmacs-region "yellow")
90 (set-face-font 'default "*courier-bold-r*120-100-100*")
91 (set-face-background 'highlight "blue") ; Ie when selecting
93 (set-face-foreground 'highlight "yellow")
94 (set-face-background 'modeline "blue") ; Line at bottom
96 (set-face-foreground 'modeline "white")
97 (set-face-font 'modeline "*bold-r-normal*140-100-100*")
98 (set-face-background 'isearch "yellow") ; When highlighting
100 (set-face-foreground 'isearch "red")
101 (setq x-pointer-foreground-color "black") ; Adds to bg color,
103 (setq x-pointer-background-color "blue") ; This is color
108 File: xemacs-faq.info, Node: Q3.2.2, Next: Q3.2.3, Prev: Q3.2.1, Up: Customization
110 Q3.2.2: How do I set the text, menu and modeline fonts?
111 -------------------------------------------------------
113 Note that you should use `Emacs.' and not `Emacs*' when setting face
118 Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
119 Emacs*menubar*font: fixed
120 Emacs.modeline.attributeFont: fixed
122 This is confusing because modeline is a face, and can be found listed
123 with all faces in the current mode by using `M-x set-face-font (enter)
124 ?'. It uses the face specification of `attributeFont', while menubar
125 is a normal X thing that uses the specification `font'. With Motif it
126 may be necessary to use `fontList' instead of `font'.
129 File: xemacs-faq.info, Node: Q3.2.3, Next: Q3.2.4, Prev: Q3.2.2, Up: Customization
131 Q3.2.3: How can I set the colors when highlighting a region?
132 ------------------------------------------------------------
134 How can I set the background/foreground colors when highlighting a
137 You can change the face `zmacs-region' either in your `.Xdefaults':
139 Emacs.zmacs-region.attributeForeground: firebrick
140 Emacs.zmacs-region.attributeBackground: lightseagreen
144 (set-face-background 'zmacs-region "red")
145 (set-face-foreground 'zmacs-region "yellow")
148 File: xemacs-faq.info, Node: Q3.2.4, Next: Q3.2.5, Prev: Q3.2.3, Up: Customization
150 Q3.2.4: How can I limit color map usage?
151 ----------------------------------------
153 I'm using Netscape (or another color grabber like XEmacs); is there
154 anyway to limit the number of available colors in the color map?
156 XEmacs 19.13 didn't have such a mechanism (unlike netscape, or other
157 color-hogs). One solution is to start XEmacs prior to netscape, since
158 this will prevent Netscape from grabbing all colors (but Netscape will
159 complain). You can use the flags for Netscape, like -mono, -ncols <#>
160 or -install (for mono, limiting to <#> colors, or for using a private
161 color map). Since Netscape will take the entire colormap and never
162 release it, the only reasonable way to run it is with `-install'.
164 If you have the money, another solution would be to use a truecolor
165 or direct color video.
167 Starting with XEmacs 19.14, XEmacs uses the closest available color
168 if the colormap is full, so it's O.K. now to start Netscape first.
171 File: xemacs-faq.info, Node: Q3.2.5, Next: Q3.2.6, Prev: Q3.2.4, Up: Customization
173 Q3.2.5: My tty supports color, but XEmacs doesn't use them.
174 -----------------------------------------------------------
176 XEmacs tries to automatically determine whether your tty supports
177 color, but sometimes guesses wrong. In that case, you can make XEmacs
178 Do The Right Thing using this Lisp code:
180 (if (eq 'tty (device-type))
181 (set-device-class nil 'color))
184 File: xemacs-faq.info, Node: Q3.2.6, Next: Q3.3.1, Prev: Q3.2.5, Up: Customization
186 Q3.2.6: Can I have pixmap backgrounds in XEmacs?
187 ------------------------------------------------
189 Juan Villacis <jvillaci@wahnsinnig.extreme.indiana.edu> writes:
191 There are several ways to do it. For example, you could specify a
192 default pixmap image to use in your `~/.Xresources', e.g.,
194 Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
196 and then reload ~/.Xresources and restart XEmacs. Alternatively,
197 since each face can have its own pixmap background, a better way
198 would be to set a face's pixmap within your XEmacs init file, e.g.,
200 (set-face-background-pixmap 'default "/path/to/image.xpm")
201 (set-face-background-pixmap 'bold "/path/to/another_image.xpm")
203 and so on. You can also do this interactively via `M-x
208 File: xemacs-faq.info, Node: Q3.3.1, Next: Q3.3.2, Prev: Q3.2.6, Up: Customization
213 Q3.3.1: How can I make the modeline go away?
214 --------------------------------------------
216 (set-specifier has-modeline-p nil)
218 Starting with XEmacs 19.14 the modeline responds to mouse clicks, so
219 if you haven't liked or used the modeline in the past, you might want to
220 try the new version out.
223 File: xemacs-faq.info, Node: Q3.3.2, Next: Q3.3.3, Prev: Q3.3.1, Up: Customization
225 Q3.3.2: How do you have XEmacs display the line number in the modeline?
226 -----------------------------------------------------------------------
228 Add the following line to your `.emacs' file to display the line
233 Use the following to display the column number:
235 (column-number-mode 1)
237 Or select from the `Options' menu
238 `Customize->Emacs->Editing->Basics->Line Number Mode' and/or
239 `Customize->Emacs->Editing->Basics->Column Number Mode'
241 Or type `M-x customize <RET> editing-basics <RET>'.
244 File: xemacs-faq.info, Node: Q3.3.3, Next: Q3.3.4, Prev: Q3.3.2, Up: Customization
246 Q3.3.3: How do I get XEmacs to put the time of day on the modeline?
247 -------------------------------------------------------------------
249 Add the following line to your `.emacs' file to display the time:
253 See `Customize' from the `Options' menu for customization.
256 File: xemacs-faq.info, Node: Q3.3.4, Next: Q3.3.5, Prev: Q3.3.3, Up: Customization
258 Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
259 ----------------------------------------------------------------
261 With AUC TeX, fast typing is hard because the current chapter,
262 section etc. are given in the modeline. How can I turn this off?
264 It's not AUC TeX, it comes from `func-menu' in `func-menu.el'. Add
265 this code to your `.emacs' to turn it off:
267 (setq fume-display-in-modeline-p nil)
269 Or just add a hook to `TeX-mode-hook' to turn it off only for TeX
272 (add-hook 'TeX-mode-hook
273 '(lambda () (setq fume-display-in-modeline-p nil)))
275 David Hughes <dhughes@origin-at.co.uk> writes:
277 If you have 19.14 or later, try this instead; you'll still get the
278 function name displayed in the modeline, but it won't attempt to
279 keep track when you modify the file. To refresh when it gets out
280 of synch, you simply need click on the `Rescan Buffer' option in
283 (setq-default fume-auto-rescan-buffer-p nil)
286 File: xemacs-faq.info, Node: Q3.3.5, Next: Q3.4.1, Prev: Q3.3.4, Up: Customization
288 Q3.3.5: How can one change the modeline color based on the mode used?
289 ---------------------------------------------------------------------
291 You can use something like the following:
293 (add-hook 'lisp-mode-hook
295 (set-face-background 'modeline "red" (current-buffer))))
297 Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
298 colors change from the default set in your `.emacs'. The change will
299 only be made in the buffer you just entered (which contains the Lisp
300 file you are editing) and will not affect the modeline colors anywhere
305 * The hook is the mode name plus `-hook'. eg. c-mode-hook,
306 c++-mode-hook, emacs-lisp-mode-hook (used for your `.emacs' or a
307 `xx.el' file), lisp-interaction-mode-hook (the `*scratch*'
308 buffer), text-mode-hook, etc.
310 * Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
311 otherwise you will erase anything that anybody has already put on
314 * You can also do `(set-face-font 'modeline FONT)', eg.
315 `(set-face-font 'modeline "*bold-r-normal*140-100-100*"
316 (current-buffer))' if you wish the modeline font to vary based on
319 This works in 19.15 as well, but there are additional modeline faces,
320 `modeline-buffer-id', `modeline-mousable', and
321 `modeline-mousable-minor-mode', which you may want to customize.
324 File: xemacs-faq.info, Node: Q3.4.1, Next: Q3.4.2, Prev: Q3.3.5, Up: Customization
326 3.4: Multiple Device Support
327 ============================
329 Q3.4.1: How do I open a frame on another screen of my multi-headed display?
330 ---------------------------------------------------------------------------
332 The support for this was revamped for 19.14. Use the command `M-x
333 make-frame-on-display'. This command is also on the File menu in the
336 XEmacs 19.14 and later also have the command `make-frame-on-tty'
337 which will establish a connection to any tty-like device. Opening the
338 TTY devices should be left to `gnuclient', though.
341 File: xemacs-faq.info, Node: Q3.4.2, Next: Q3.5.1, Prev: Q3.4.1, Up: Customization
343 Q3.4.2: Can I really connect to a running XEmacs after calling up over a modem? How?
344 -------------------------------------------------------------------------------------
346 If you're not running at least XEmacs 19.14, you can't. Otherwise
347 check out the `gnuattach' program supplied with XEmacs. Starting with
348 XEmacs 20.3, `gnuattach' and `gnudoit' functionality is provided by
351 Also *Note Q5.0.12::.
354 File: xemacs-faq.info, Node: Q3.5.1, Next: Q3.5.2, Prev: Q3.4.2, Up: Customization
359 Q3.5.1: How can I bind complex functions (or macros) to keys?
360 -------------------------------------------------------------
362 As an example, say you want the `paste' key on a Sun keyboard to
363 insert the current Primary X selection at point. You can accomplish this
366 (define-key global-map [f18] 'x-insert-selection)
368 However, this only works if there is a current X selection (the
369 selection will be highlighted). The functionality I like is for the
370 `paste' key to insert the current X selection if there is one,
371 otherwise insert the contents of the clipboard. To do this you need to
372 pass arguments to `x-insert-selection'. This is done by wrapping the
373 call in a 'lambda form:
375 (global-set-key [f18]
376 (lambda () (interactive) (x-insert-selection t nil)))
378 This binds the f18 key to a "generic" functional object. The
379 interactive spec is required because only interactive functions can be
382 For the FAQ example you could use:
384 (global-set-key [(control ?.)]
385 (lambda () (interactive) (scroll-up 1)))
386 (global-set-key [(control ?;)]
387 (lambda () (interactive) (scroll-up -1)))
389 This is fine if you only need a few functions within the lambda body.
390 If you're doing more it's cleaner to define a separate function as in
391 question 3.5.3 (*note Q3.5.3::).
394 File: xemacs-faq.info, Node: Q3.5.2, Next: Q3.5.3, Prev: Q3.5.1, Up: Customization
396 Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
397 --------------------------------------------------------------------------------------
399 Add the following line to your `.emacs' file:
401 (setq next-line-add-newlines nil)
403 This has been the default setting in XEmacs for some time.
406 File: xemacs-faq.info, Node: Q3.5.3, Next: Q3.5.4, Prev: Q3.5.2, Up: Customization
408 Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
409 -----------------------------------------------------------------
411 Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
412 and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
414 (defun scroll-up-one-line ()
418 (defun scroll-down-one-line ()
422 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
423 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
425 The key point is that you can only bind simple functions to keys; you
426 can not bind a key to a function that you're also passing arguments to.
427 (*note Q3.5.1:: for a better answer).
430 File: xemacs-faq.info, Node: Q3.5.4, Next: Q3.5.5, Prev: Q3.5.3, Up: Customization
432 Q3.5.4: Globally binding `Delete'?
433 ----------------------------------
435 I cannot manage to globally bind my `Delete' key to something other
436 than the default. How does one do this?
440 (message "You hit DELETE"))
442 (global-set-key 'delete 'foo)
444 However, some modes explicitly bind `Delete', so you would need to
445 add a hook that does `local-set-key' for them. If what you want to do
446 is make the Backspace and Delete keys work more PC/Motif-like, then
447 take a look at the `delbs.el' package.
449 New in XEmacs 19.14 is a variable called `key-translation-map' which
450 makes it easier to bind `Delete'. `delbs.el' is a good example of how
451 to do this correctly.
453 Also *Note Q3.5.10::.
456 File: xemacs-faq.info, Node: Q3.5.5, Next: Q3.5.6, Prev: Q3.5.4, Up: Customization
458 Q3.5.5: Scrolling one line at a time.
459 -------------------------------------
461 Can the cursor keys scroll the screen a line at a time, rather than
462 the default half page jump? I tend it to find it disorienting.
466 (defun scroll-one-line-up (&optional arg)
467 "Scroll the selected window up (forward in the text) one line (or N lines)."
469 (scroll-up (or arg 1)))
471 (defun scroll-one-line-down (&optional arg)
472 "Scroll the selected window down (backward in the text) one line (or N)."
474 (scroll-down (or arg 1)))
476 (global-set-key [up] 'scroll-one-line-up)
477 (global-set-key [down] 'scroll-one-line-down)
479 The following will also work but will affect more than just the
480 cursor keys (i.e. `C-n' and `C-p'):
484 Starting with XEmacs-20.3 you can also change this with Customize.
485 Select from the `Options' menu
486 `Customize->Emacs->Environment->Windows->Scroll Step...' or type `M-x
487 customize <RET> windows <RET>'.
490 File: xemacs-faq.info, Node: Q3.5.6, Next: Q3.5.7, Prev: Q3.5.5, Up: Customization
492 Q3.5.6: How to map `Help' key alone on Sun type4 keyboard?
493 ----------------------------------------------------------
495 The following works in GNU Emacs 19:
497 (global-set-key [help] 'help-command);; Help
499 The following works in XEmacs 19.15 with the addition of shift:
501 (global-set-key [(shift help)] 'help-command);; Help
503 But it doesn't work alone. This is in the file `PROBLEMS' which
504 should have come with your XEmacs installation: _Emacs ignores the
505 `help' key when running OLWM_.
507 OLWM grabs the `help' key, and retransmits it to the appropriate
508 client using `XSendEvent'. Allowing Emacs to react to synthetic events
509 is a security hole, so this is turned off by default. You can enable
510 it by setting the variable `x-allow-sendevents' to t. You can also
511 cause fix this by telling OLWM to not grab the help key, with the null
512 binding `OpenWindows.KeyboardCommand.Help:'.
515 File: xemacs-faq.info, Node: Q3.5.7, Next: Q3.5.8, Prev: Q3.5.6, Up: Customization
517 Q3.5.7: How can you type in special characters in XEmacs?
518 ---------------------------------------------------------
520 One way is to use the package `x-compose'. Then you can use
521 sequences like `Compose " a' to get ä, etc.
523 Another way is to use the `iso-insert' package, provided in XEmacs
524 19.15 and later. Then you can use sequences like `C-x 8 " a' to get ä,
527 Glynn Clements <glynn@sensei.co.uk> writes:
529 It depends upon your X server.
531 Generally, the simplest way is to define a key as Multi_key with
533 xmodmap -e 'keycode 0xff20 = Multi_key'
535 You will need to pick an appropriate keycode. Use xev to find out
536 the keycodes for each key.
538 [NB: On a `Windows' keyboard, recent versions of XFree86
539 automatically define the right `Windows' key as Multi_key'.]
541 Once you have Multi_key defined, you can use e.g.
548 Also, recent versions of XFree86 define various AltGr-<key>
549 combinations as dead keys, i.e.
550 AltGr [ => dead_diaeresis
551 AltGr ] => dead_tilde
552 AltGr ; => dead_acute
555 Running `xmodmap -pk' will list all of the defined keysyms.
558 File: xemacs-faq.info, Node: Q3.5.8, Next: Q3.5.9, Prev: Q3.5.7, Up: Customization
560 Q3.5.8: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
561 ---------------------------------------------------------------------------
563 Why does `(define-key global-map [ delete-forward ] 'delete-char)'
564 complain of not being able to bind an unknown key?
568 (define-key global-map [delete_forward] 'delete-char)
572 What you are seeing above is a bug due to code that is trying to
573 check for GNU Emacs syntax like:
575 (define-key global-map [C-M-a] 'delete-char)
577 which otherwise would cause no errors but would not result in the
580 This bug has been fixed in 19.14.
583 File: xemacs-faq.info, Node: Q3.5.9, Next: Q3.5.10, Prev: Q3.5.8, Up: Customization
585 Q3.5.9: How do I make the Delete key delete forward?
586 ----------------------------------------------------
588 With XEmacs-20.2 use the `delbs' package:
592 This will give you the functions `delbs-enable-delete-forward' to
593 set things up, and `delbs-disable-delete-forward' to revert to "normal"
594 behavior. Note that `delbackspace' package is obsolete.
596 Starting with XEmacs-20.3 better solution is to set variable
597 `delete-key-deletes-forward' to t. You can also change this with
598 Customize. Select from the `Options' menu
599 `Customize->Emacs->Editing->Basics->Delete Key Deletes Forward' or type
600 `M-x customize <RET> editing-basics <RET>'.
605 File: xemacs-faq.info, Node: Q3.5.10, Next: Q3.5.11, Prev: Q3.5.9, Up: Customization
607 Q3.5.10: Can I turn on "sticky" modifier keys?
608 ----------------------------------------------
610 Yes, with `(setq modifier-keys-are-sticky t)'. This will give the
611 effect of being able to press and release Shift and have the next
612 character typed come out in upper case. This will affect all the other
613 modifier keys like Control and Meta as well.
615 Ben Wing <ben@xemacs.org> writes:
617 One thing about the sticky modifiers is that if you move the mouse
618 out of the frame and back in, it cancels all currently "stuck"
622 File: xemacs-faq.info, Node: Q3.5.11, Next: Q3.6.1, Prev: Q3.5.10, Up: Customization
624 Q3.5.11: How do I map the arrow keys?
625 -------------------------------------
627 Say you want to map `C-<right>' to forward-word:
629 Sam Steingold <sds@usa.net> writes:
631 ; both XEmacs and Emacs
632 (define-key global-map [(control right)] 'forward-word)
635 (define-key global-map [C-right] 'forward-word)
638 (define-key global-map (kbd "C-<right>") 'forward-word)
641 File: xemacs-faq.info, Node: Q3.6.1, Next: Q3.6.2, Prev: Q3.5.11, Up: Customization
646 Q3.6.1: Is there a way to make the bar cursor thicker?
647 ------------------------------------------------------
649 I'd like to have the bar cursor a little thicker, as I tend to
652 For a 1 pixel bar cursor, use:
656 For a 2 pixel bar cursor, use:
658 (setq bar-cursor 'anything-else)
660 Starting with XEmacs-20.3 you can also change these with Customize.
661 Select from the `Options' menu
662 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
663 customize <RET> display <RET>'.
665 You can use a color to make it stand out better:
667 Emacs*cursorColor: Red
670 File: xemacs-faq.info, Node: Q3.6.2, Next: Q3.6.3, Prev: Q3.6.1, Up: Customization
672 Q3.6.2: Is there a way to get back the block cursor?
673 ----------------------------------------------------
675 (setq bar-cursor nil)
677 Starting with XEmacs-20.3 you can also change this with Customize.
678 Select from the `Options' menu
679 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
680 customize <RET> display <RET>'.
683 File: xemacs-faq.info, Node: Q3.6.3, Next: Q3.7.1, Prev: Q3.6.2, Up: Customization
685 Q3.6.3: Can I make the cursor blink?
686 ------------------------------------
688 If you are running a version of XEmacs older than 19.14, no.
689 Otherwise you can do the following:
693 This function toggles between a steady cursor and a blinking cursor.
694 You may also set this mode from the menu bar by selecting `Options =>
695 Frame Appearance => Blinking Cursor'. Remember to save options.
698 File: xemacs-faq.info, Node: Q3.7.1, Next: Q3.7.2, Prev: Q3.6.3, Up: Customization
700 3.7: The Mouse and Highlighting
701 ===============================
703 Q3.7.1: How can I turn off Mouse pasting?
704 -----------------------------------------
706 I keep hitting the middle mouse button by accident and getting stuff
707 pasted into my buffer so how can I turn this off?
709 Here is an alternative binding, whereby the middle mouse button
710 selects (but does not cut) the expression under the mouse. Clicking
711 middle on a left or right paren will select to the matching one. Note
712 that you can use `define-key' or `global-set-key'.
714 (defun mouse-set-point-and-select (event)
715 "Sets the point at the mouse location, then marks following form"
717 (mouse-set-point event)
719 (define-key global-map [button2] 'mouse-set-point-and-select)
722 File: xemacs-faq.info, Node: Q3.7.2, Next: Q3.7.3, Prev: Q3.7.1, Up: Customization
724 Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
725 -----------------------------------------------------------------
727 Use, for instance, `[(meta button1)]'. For example, here is a common
728 setting for Common Lisp programmers who use the bundled `ilisp'
729 package, whereby meta-button1 on a function name will find the file
730 where the function name was defined, and put you at that location in
733 [Inside a function that gets called by the lisp-mode-hook and
736 (local-set-key [(meta button1)] 'edit-definitions-lisp)
739 File: xemacs-faq.info, Node: Q3.7.3, Next: Q3.7.4, Prev: Q3.7.2, Up: Customization
741 Q3.7.3: Clicking the left button does not do anything in buffer list.
742 ---------------------------------------------------------------------
744 I do `C-x C-b' to get a list of buffers and the entries get
745 highlighted when I move the mouse over them but clicking the left mouse
746 does not do anything.
748 Use the middle mouse button.
751 File: xemacs-faq.info, Node: Q3.7.4, Next: Q3.7.5, Prev: Q3.7.3, Up: Customization
753 Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
754 ------------------------------------------------------------------
756 The following code will replace the default popup on button3:
758 (global-set-key [button3] 'popup-buffer-menu)
761 File: xemacs-faq.info, Node: Q3.7.5, Next: Q3.7.6, Prev: Q3.7.4, Up: Customization
763 Q3.7.5: Why does cut-and-paste not work between XEmacs and a cmdtool?
764 ---------------------------------------------------------------------
766 We don't know. It's a bug. There does seem to be a work-around,
767 however. Try running xclipboard first. It appears to fix the problem
768 even if you exit it. (This should be mostly fixed in 19.13, but we
769 haven't yet verified that).
772 File: xemacs-faq.info, Node: Q3.7.6, Next: Q3.7.7, Prev: Q3.7.5, Up: Customization
774 Q3.7.6: How I can set XEmacs up so that it pastes where the text cursor is?
775 ---------------------------------------------------------------------------
777 By default XEmacs pastes X selections where the mouse pointer is.
778 How do I disable this?
780 Examine the function `mouse-yank', by typing `C-h f mouse-yank
783 To get XEmacs to paste at the text cursor, add this your `.emacs':
785 (setq mouse-yank-at-point t)
787 Starting with XEmacs-20.2 you can also change this with Customize.
788 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Yank
789 At Point...' or type `M-x customize <RET> mouse <RET>'.
792 File: xemacs-faq.info, Node: Q3.7.7, Next: Q3.7.8, Prev: Q3.7.6, Up: Customization
794 Q3.7.7: How do I select a rectangular region?
795 ---------------------------------------------
797 Just select the region normally, then use the rectangle commands
798 (e.g. `kill-rectangle' on it. The region does not highlight as a
799 rectangle, but the commands work just fine.
801 To actually sweep out rectangular regions with the mouse you can use
802 `mouse-track-do-rectangle' which is assigned to `M-button1'. Then use
805 You can also do the following to change default behavior to sweep out
808 (setq mouse-track-rectangle-p t)
810 Starting with XEmacs-20.2 you can also change this with Customize.
811 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Track
812 Rectangle...' or type `M-x customize <RET> mouse <RET>'.
814 mouse-track-do-rectangle: (event)
815 -- an interactive compiled Lisp function.
816 Like `mouse-track' but selects rectangles instead of regions.
819 File: xemacs-faq.info, Node: Q3.7.8, Next: Q3.8.1, Prev: Q3.7.7, Up: Customization
821 Q3.7.8: Why does `M-w' take so long?
822 ------------------------------------
824 It actually doesn't. It leaves the region visible for a second so
825 that you can see what area is being yanked. If you start working,
826 though, it will immediately complete its operation. In other words, it
827 will only delay for a second if you let it.
830 File: xemacs-faq.info, Node: Q3.8.1, Next: Q3.8.2, Prev: Q3.7.8, Up: Customization
832 3.8: The Menubar and Toolbar
833 ============================
835 Q3.8.1: How do I get rid of the menu (or menubar)?
836 --------------------------------------------------
838 If you are running XEmacs 19.13 and earlier, add this command to your
843 Starting with XEmacs 19.14 the preferred method is:
845 (set-specifier menubar-visible-p nil)
848 File: xemacs-faq.info, Node: Q3.8.2, Next: Q3.8.3, Prev: Q3.8.1, Up: Customization
850 Q3.8.2: Can I customize the basic menubar?
851 ------------------------------------------
853 For an extensive menubar, add this line to your `.emacs':
857 If you'd like to write your own, this file provides as good a set of
858 examples as any to start from. The file is located in
859 `lisp/packages/big-menubar.el' in the XEmacs installation directory.
862 File: xemacs-faq.info, Node: Q3.8.3, Next: Q3.8.4, Prev: Q3.8.2, Up: Customization
864 Q3.8.3: How do I control how many buffers are listed in the menu `Buffers List'?
865 --------------------------------------------------------------------------------
867 Add the following to your `.emacs' (suit to fit):
869 (setq buffers-menu-max-size 20)
871 For no limit, use an argument of `nil'.
873 Starting with XEmacs-20.3 you can also change this with Customize.
874 Select from the `Options' menu
875 `Customize->Emacs->Environment->Menu->Buffers Menu->Max Size...' or
876 type `M-x customize <RET> buffers-menu <RET>'.
879 File: xemacs-faq.info, Node: Q3.8.4, Next: Q3.8.5, Prev: Q3.8.3, Up: Customization
881 Q3.8.4: Resources like `Emacs*menubar*font' are not working?
882 ------------------------------------------------------------
884 I am trying to use a resource like `Emacs*menubar*font' to set the
885 font of the menubar but it's not working.
887 If you are using the real Motif menubar, this resource is not
888 recognized; you have to say:
890 Emacs*menubar*fontList: FONT
892 If you are using the Lucid menubar, the former resource will be
893 recognized only if the latter resource is unset. This means that the
900 Emacs*menubar*font: FONT
902 even though the latter is more specific.
905 File: xemacs-faq.info, Node: Q3.8.5, Next: Q3.9.1, Prev: Q3.8.4, Up: Customization
907 Q3.8.5: How can I bind a key to a function to toggle the toolbar?
908 -----------------------------------------------------------------
912 (defun my-toggle-toolbar ()
914 (set-specifier default-toolbar-visible-p
915 (not (specifier-instance default-toolbar-visible-p))))
916 (global-set-key "\C-xT" 'my-toggle-toolbar)
918 There are redisplay bugs in 19.14 that may make the preceding result
919 in a messed-up display, especially for frames with multiple windows.
920 You may need to resize the frame before XEmacs completely realizes the
921 toolbar is really gone.
923 Thanks to Martin Buchholz <martin@xemacs.org> for the correct code.
926 File: xemacs-faq.info, Node: Q3.9.1, Next: Q3.9.2, Prev: Q3.8.5, Up: Customization
931 Q3.9.1: How can I disable the scrollbar?
932 ----------------------------------------
934 To disable them for all frames, add the following line to your
937 Emacs.scrollBarWidth: 0
939 Or select from the `Options' menu `Frame Appearance->Scrollbars'.
940 Remember to save options.
942 To turn the scrollbar off on a per-frame basis, use the following
945 (set-specifier scrollbar-width 0 (selected-frame))
947 You can actually turn the scrollbars on at any level you want by
948 substituting for (selected-frame) in the above command. For example, to
949 turn the scrollbars off only in a single buffer:
951 (set-specifier scrollbar-width 0 (current-buffer))
953 In XEmacs versions prior to 19.14, you had to use the hairier
956 (set-specifier scrollbar-width (cons (selected-frame) 0))
959 File: xemacs-faq.info, Node: Q3.9.2, Next: Q3.9.3, Prev: Q3.9.1, Up: Customization
961 Q3.9.2: How can one use resources to change scrollbar colors?
962 -------------------------------------------------------------
964 Here's a recap of how to use resources to change your scrollbar
969 Emacs*XmScrollBar.Background: skyblue
970 Emacs*XmScrollBar.troughColor: lightgray
974 Emacs*Scrollbar.Foreground: skyblue
975 Emacs*Scrollbar.Background: lightgray
977 Note the capitalization of `Scrollbar' for the Athena widget.
980 File: xemacs-faq.info, Node: Q3.9.3, Next: Q3.9.4, Prev: Q3.9.2, Up: Customization
982 Q3.9.3: Moving the scrollbar can move the point; can I disable this?
983 --------------------------------------------------------------------
985 When I move the scrollbar in an XEmacs window, it moves the point as
986 well, which should not be the default behavior. Is this a bug or a
987 feature? Can I disable it?
989 The current behavior is a feature, not a bug. Point remains at the
990 same buffer position as long as that position does not scroll off the
991 screen. In that event, point will end up in either the upper-left or
992 lower-left hand corner.
994 This cannot be changed.
997 File: xemacs-faq.info, Node: Q3.9.4, Next: Q3.10.1, Prev: Q3.9.3, Up: Customization
999 Q3.9.4: How can I get automatic horizontal scrolling?
1000 -----------------------------------------------------
1002 By the same token, how can I turn it off in specific modes?
1004 To do this, add to your `.emacs' file:
1006 (require 'auto-show)
1008 Then do `(setq truncate-lines t)' in the mode-hooks for any modes in
1009 which you want lines truncated.
1011 More precisely: If `truncate-lines' is nil, horizontal scrollbars
1012 will never appear. Otherwise, they will appear only if the value of
1013 `scrollbar-height' for that buffer/window/etc. is non-zero. If you do
1015 (set-specifier scrollbar-height 0)
1017 then horizontal scrollbars will not appear in truncated buffers
1018 unless the package specifically asked for them.
1020 Automatic horizontal scrolling is now standard, starting with 19.14.
1023 File: xemacs-faq.info, Node: Q3.10.1, Next: Q3.10.2, Prev: Q3.9.4, Up: Customization
1025 3.10: Text Selections
1026 =====================
1028 Q3.10.1: How can I turn off or change highlighted selections?
1029 -------------------------------------------------------------
1031 The `zmacs' mode allows for what some might call gratuitous
1032 highlighting for selected regions (either by setting mark or by using
1033 the mouse). This is the default behavior. To turn off, add the
1034 following line to your `.emacs' file:
1036 (setq zmacs-regions nil)
1038 Starting with XEmacs-20.2 you can also change this with Customize.
1039 Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
1040 Regions' or type `M-x customize <RET> editing-basics <RET>'.
1042 To change the face for selection, look at `Options->Customize' on
1046 File: xemacs-faq.info, Node: Q3.10.2, Next: Q3.10.3, Prev: Q3.10.1, Up: Customization
1048 Q3.10.2: How do I get that typing on an active region removes it?
1049 -----------------------------------------------------------------
1051 I want to change things so that if I select some text and start
1052 typing, the typed text replaces the selected text, similar to Motif.
1054 You want to use something called "pending delete". Pending delete
1055 is what happens when you select a region (with the mouse or keyboard)
1056 and you press a key to replace the selected region by the key you typed.
1057 Usually backspace kills the selected region.
1059 To get this behavior, add the following lines to your `.emacs':
1062 ((fboundp 'turn-on-pending-delete)
1063 (turn-on-pending-delete))
1064 ((fboundp 'pending-delete-on)
1065 (pending-delete-on t)))
1067 Note that this will work with both Backspace and Delete. This code
1068 is a tad more complicated than it has to be for XEmacs in order to make
1072 File: xemacs-faq.info, Node: Q3.10.3, Next: Q3.10.4, Prev: Q3.10.2, Up: Customization
1074 Q3.10.3: Can I turn off the highlight during isearch?
1075 -----------------------------------------------------
1077 I do not like my text highlighted while I am doing isearch as I am
1078 not able to see what's underneath. How do I turn it off?
1080 Put the following in your `.emacs':
1082 (setq isearch-highlight nil)
1084 Starting with XEmacs-20.2 you can also change this with Customize.
1085 Type `M-x customize-variable <RET> isearch-highlight <RET>'.
1087 Note also that isearch-highlight affects query-replace and ispell.
1088 Instead of disabling isearch-highlight you may find that a better
1089 solution consists of customizing the `isearch' face.
1092 File: xemacs-faq.info, Node: Q3.10.4, Next: Q3.10.5, Prev: Q3.10.3, Up: Customization
1094 Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
1095 --------------------------------------------------------------------
1097 Put this in your `.emacs':
1099 (setq zmacs-regions nil)
1101 *Warning: This command turns off all region highlighting.*
1103 Also *Note Q3.10.1::.
1106 File: xemacs-faq.info, Node: Q3.10.5, Prev: Q3.10.4, Up: Customization
1108 Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
1109 ----------------------------------------------------------------------------
1111 This has been fixed by default starting with XEmacs-20.3.
1113 With older versions you can turn this feature (if it indeed is a
1114 feature) off like this:
1116 (defadvice scroll-up (around scroll-up freeze)
1118 (let ((zmacs-region-stays t))
1122 (end-of-buffer (goto-char (point-max))))
1125 (defadvice scroll-down (around scroll-down freeze)
1127 (let ((zmacs-region-stays t))
1131 (beginning-of-buffer (goto-char (point-min))))
1134 Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
1138 File: xemacs-faq.info, Node: Subsystems, Next: Miscellaneous, Prev: Customization, Up: Top
1143 This is part 4 of the XEmacs Frequently Asked Questions list. This
1144 section is devoted to major XEmacs subsystems.
1148 Reading Mail with VM:
1149 * Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
1150 * Q4.0.2:: How do I get VM to filter mail for me?
1151 * Q4.0.3:: How can I get VM to automatically check for new mail?
1152 * Q4.0.4:: [This question intentionally left blank]
1153 * Q4.0.5:: How do I get my outgoing mail archived?
1154 * Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
1155 * Q4.0.7:: Is there a mailing list or FAQ for VM?
1156 * Q4.0.8:: Remote mail reading with VM.
1157 * Q4.0.9:: rmail or VM gets an error incorporating new mail.
1158 * Q4.0.10:: How do I make VM stay in a single frame?
1159 * Q4.0.11:: How do I make VM or mh-e display graphical smilies?
1160 * Q4.0.12:: Customization of VM not covered in the manual or here.
1162 Web browsing with W3:
1163 * Q4.1.1:: What is W3?
1164 * Q4.1.2:: How do I run W3 from behind a firewall?
1165 * Q4.1.3:: Is it true that W3 supports style sheets and tables?
1167 Reading Netnews and Mail with Gnus:
1168 * Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
1169 * Q4.2.2:: [This question intentionally left blank]
1170 * Q4.2.3:: How do I make Gnus stay within a single frame?
1171 * Q4.2.4:: How do I customize the From: line?
1174 * Q4.3.1:: How can I read and/or compose MIME messages?
1175 * Q4.3.2:: What is TM and where do I get it?
1176 * Q4.3.3:: Why isn't this `movemail' program working?
1177 * Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
1178 * Q4.3.5:: Where do I find pstogif (required by tm)?
1180 Sparcworks, EOS, and WorkShop:
1181 * Q4.4.1:: What is SPARCworks, EOS, and WorkShop
1182 * Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21?
1185 * Q4.5.1:: What is/was Energize?
1188 * Q4.6.1:: What is Infodock?
1190 Other Unbundled Packages:
1191 * Q4.7.1:: What is AUC TeX? Where do you get it?
1192 * Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
1193 * Q4.7.3:: [This question intentionally left blank]
1194 * Q4.7.4:: Problems installing AUC TeX
1195 * Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs?
1196 * Q4.7.6:: Is there a MatLab mode?
1199 File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Subsystems, Up: Subsystems
1201 4.0: Reading Mail with VM
1202 =========================
1204 Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
1205 -------------------------------------------------------------------------
1207 Use `vm-spool-files', like this for example:
1209 (setq vm-spool-files '("/var/spool/mail/wing"
1210 "netcom23.netcom.com:110:pass:wing:MYPASS"))
1212 Of course substitute your actual password for MYPASS.
1215 File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Subsystems
1217 Q4.0.2: How do I get VM to filter mail for me?
1218 ----------------------------------------------
1220 One possibility is to use procmail to split your mail before it gets
1221 to VM. I prefer this personally, since there are many strange and
1222 wonderful things one can do with procmail. Procmail may be found at
1223 `ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
1225 Also see the Mail Filtering FAQ at:
1226 `ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
1229 File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Subsystems
1231 Q4.0.3: How can I get VM to automatically check for new mail?
1232 -------------------------------------------------------------
1234 John Turner <turner@lanl.gov> writes:
1238 (setq vm-auto-get-new-mail 60)
1241 File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Subsystems
1243 Q4.0.4: [This question intentionally left blank]
1244 ------------------------------------------------
1246 Obsolete question, left blank to avoid renumbering.
1249 File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Subsystems
1251 Q4.0.5: How do I get my outgoing mail archived?
1252 -----------------------------------------------
1254 (setq mail-archive-file-name "~/outbox")
1257 File: xemacs-faq.info, Node: Q4.0.6, Next: Q4.0.7, Prev: Q4.0.5, Up: Subsystems
1259 Q4.0.6: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
1260 ---------------------------------------------------------------------------------------------------------------------
1262 Set `vm-reply-ignored-addresses' to a list, like
1264 (setq vm-reply-ignored-addresses
1265 '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
1266 "wing@netcom.com" "wing@xemacs.org"))
1268 Note that each string is a regular expression.
1271 File: xemacs-faq.info, Node: Q4.0.7, Next: Q4.0.8, Prev: Q4.0.6, Up: Subsystems
1273 Q4.0.7: Is there a mailing list or FAQ for VM?
1274 ----------------------------------------------
1276 A FAQ for VM exists at `http://www.cyberpass.net/~gorkab/vmfaq.htm'.
1278 VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
1281 File: xemacs-faq.info, Node: Q4.0.8, Next: Q4.0.9, Prev: Q4.0.7, Up: Subsystems
1283 Q4.0.8: Remote mail reading with VM.
1284 ------------------------------------
1286 My mailbox lives at the office on a big honkin server. My regular
1287 INBOX lives on my honkin desktop machine. I now can PPP to the office
1288 from home which is far from honking... I'd like to be able to read
1289 mail at home without storing it here and I'd like to use xemacs and VM
1290 at home... Is there a recommended setup?
1292 Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
1294 There are several ways to do this.
1296 1. Set your display to your home machine and run dxpc or one of
1297 the other X compressors.
1299 2. NFS mount your desktop machine on your home machine and
1300 modify your pop command on your home machine to rsh to your
1301 desktop machine and actually do the pop get's.
1303 3. Run a POP server on your desktop machine as well and do a
1304 sort of two tiered POP get.
1306 William Perry <wmperry@monolith.spry.com> adds:
1308 Or you could run a pop script periodically on your desktop
1309 machine, and just use ange-ftp or NFS to get to your mailbox. I
1310 used to do this all the time back at IU.
1313 File: xemacs-faq.info, Node: Q4.0.9, Next: Q4.0.10, Prev: Q4.0.8, Up: Subsystems
1315 Q4.0.9: rmail or VM gets an error incorporating new mail.
1316 ---------------------------------------------------------
1318 Quoting the XEmacs PROBLEMS file:
1320 rmail and VM get new mail from `/usr/spool/mail/$USER' using a
1321 program called `movemail'. This program interlocks with
1322 `/bin/mail' using the protocol defined by `/bin/mail'.
1324 There are two different protocols in general use. One of them
1325 uses the `flock' system call. The other involves creating a lock
1326 file; `movemail' must be able to write in `/usr/spool/mail' in
1327 order to do this. You control which one is used by defining, or
1328 not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
1329 or s- file it includes.
1331 *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
1332 SYSTEM, YOU CAN LOSE MAIL!*
1334 If your system uses the lock file protocol, and fascist
1335 restrictions prevent ordinary users from writing the lock files in
1336 `/usr/spool/mail', you may need to make `movemail' setgid to a
1337 suitable group such as `mail'. You can use these commands (as
1343 If your system uses the lock file protocol, and fascist
1344 restrictions prevent ordinary users from writing the lock files in
1345 `/usr/spool/mail', you may need to make `movemail' setgid to a
1346 suitable group such as `mail'. To do this, use the following
1347 commands (as root) after doing the make install.
1352 Installation normally copies movemail from the build directory to
1353 an installation directory which is usually under `/usr/local/lib'.
1354 The installed copy of `movemail' is usually in the directory
1355 `/usr/local/lib/emacs/VERSION/TARGET'. You must change the group
1356 and mode of the installed copy; changing the group and mode of the
1357 build directory copy is ineffective.
1360 File: xemacs-faq.info, Node: Q4.0.10, Next: Q4.0.11, Prev: Q4.0.9, Up: Subsystems
1362 Q4.0.10: How do I make VM stay in a single frame?
1363 -------------------------------------------------
1365 John.John S Cooper <Cooper@Eng.Sun.COM> writes:
1367 ; Don't use multiple frames
1368 (setq vm-frame-per-composition nil)
1369 (setq vm-frame-per-folder nil)
1370 (setq vm-frame-per-edit nil)
1371 (setq vm-frame-per-summary nil)
1374 File: xemacs-faq.info, Node: Q4.0.11, Next: Q4.0.12, Prev: Q4.0.10, Up: Subsystems
1376 Q4.0.11: How do I make VM or mh-e display graphical smilies?
1377 ------------------------------------------------------------
1379 For mh-e use the following:
1381 (add-hook 'mh-show-mode-hook '(lambda ()
1382 (smiley-region (point-min)
1385 WJCarpenter <bill@carpenter.ORG> writes: For VM use the following:
1386 (autoload 'smiley-region "smiley" nil t)
1387 (add-hook 'vm-select-message-hook
1389 (smiley-region (point-min)
1392 For tm use the following:
1393 (autoload 'smiley-buffer "smiley" nil t)
1394 (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)