1 This is ../info/xemacs-faq.info, produced by makeinfo version 4.0 from
4 INFO-DIR-SECTION XEmacs Editor
6 * FAQ: (xemacs-faq). XEmacs FAQ.
10 File: xemacs-faq.info, Node: Q3.2.1, Next: Q3.2.2, Prev: Q3.1.8, Up: Customization
12 3.2: Textual Fonts & Colors
13 ===========================
15 Q3.2.1: How can I set color options from `.emacs'?
16 --------------------------------------------------
18 How can I set the most commonly used color options from my `.emacs'
19 instead of from my `.Xdefaults'?
23 (set-face-background 'default "bisque") ; frame background
24 (set-face-foreground 'default "black") ; normal text
25 (set-face-background 'zmacs-region "red") ; When selecting w/
27 (set-face-foreground 'zmacs-region "yellow")
28 (set-face-font 'default "*courier-bold-r*120-100-100*")
29 (set-face-background 'highlight "blue") ; Ie when selecting
31 (set-face-foreground 'highlight "yellow")
32 (set-face-background 'modeline "blue") ; Line at bottom
34 (set-face-foreground 'modeline "white")
35 (set-face-font 'modeline "*bold-r-normal*140-100-100*")
36 (set-face-background 'isearch "yellow") ; When highlighting
38 (set-face-foreground 'isearch "red")
39 (setq x-pointer-foreground-color "black") ; Adds to bg color,
41 (setq x-pointer-background-color "blue") ; This is color
46 File: xemacs-faq.info, Node: Q3.2.2, Next: Q3.2.3, Prev: Q3.2.1, Up: Customization
48 Q3.2.2: How do I set the text, menu and modeline fonts?
49 -------------------------------------------------------
51 Note that you should use `Emacs.' and not `Emacs*' when setting face
56 Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
57 Emacs*menubar*font: fixed
58 Emacs.modeline.attributeFont: fixed
60 This is confusing because modeline is a face, and can be found listed
61 with all faces in the current mode by using `M-x set-face-font (enter)
62 ?'. It uses the face specification of `attributeFont', while menubar
63 is a normal X thing that uses the specification `font'. With Motif it
64 may be necessary to use `fontList' instead of `font'.
67 File: xemacs-faq.info, Node: Q3.2.3, Next: Q3.2.4, Prev: Q3.2.2, Up: Customization
69 Q3.2.3: How can I set the colors when highlighting a region?
70 ------------------------------------------------------------
72 How can I set the background/foreground colors when highlighting a
75 You can change the face `zmacs-region' either in your `.Xdefaults':
77 Emacs.zmacs-region.attributeForeground: firebrick
78 Emacs.zmacs-region.attributeBackground: lightseagreen
82 (set-face-background 'zmacs-region "red")
83 (set-face-foreground 'zmacs-region "yellow")
86 File: xemacs-faq.info, Node: Q3.2.4, Next: Q3.2.5, Prev: Q3.2.3, Up: Customization
88 Q3.2.4: How can I limit color map usage?
89 ----------------------------------------
91 I'm using Netscape (or another color grabber like XEmacs); is there
92 anyway to limit the number of available colors in the color map?
94 XEmacs 19.13 didn't have such a mechanism (unlike netscape, or other
95 color-hogs). One solution is to start XEmacs prior to netscape, since
96 this will prevent Netscape from grabbing all colors (but Netscape will
97 complain). You can use the flags for Netscape, like -mono, -ncols <#>
98 or -install (for mono, limiting to <#> colors, or for using a private
99 color map). Since Netscape will take the entire colormap and never
100 release it, the only reasonable way to run it is with `-install'.
102 If you have the money, another solution would be to use a truecolor
103 or direct color video.
105 Starting with XEmacs 19.14, XEmacs uses the closest available color
106 if the colormap is full, so it's O.K. now to start Netscape first.
109 File: xemacs-faq.info, Node: Q3.2.5, Next: Q3.2.6, Prev: Q3.2.4, Up: Customization
111 Q3.2.5: My tty supports color, but XEmacs doesn't use them.
112 -----------------------------------------------------------
114 XEmacs tries to automatically determine whether your tty supports
115 color, but sometimes guesses wrong. In that case, you can make XEmacs
116 Do The Right Thing using this Lisp code:
118 (if (eq 'tty (device-type))
119 (set-device-class nil 'color))
122 File: xemacs-faq.info, Node: Q3.2.6, Next: Q3.3.1, Prev: Q3.2.5, Up: Customization
124 Q3.2.6: Can I have pixmap backgrounds in XEmacs?
125 ------------------------------------------------
127 Juan Villacis <jvillaci@wahnsinnig.extreme.indiana.edu> writes:
129 There are several ways to do it. For example, you could specify a
130 default pixmap image to use in your `~/.Xresources', e.g.,
132 Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
134 and then reload ~/.Xresources and restart XEmacs. Alternatively,
135 since each face can have its own pixmap background, a better way
136 would be to set a face's pixmap within your XEmacs init file, e.g.,
138 (set-face-background-pixmap 'default "/path/to/image.xpm")
139 (set-face-background-pixmap 'bold "/path/to/another_image.xpm")
141 and so on. You can also do this interactively via `M-x
146 File: xemacs-faq.info, Node: Q3.3.1, Next: Q3.3.2, Prev: Q3.2.6, Up: Customization
151 Q3.3.1: How can I make the modeline go away?
152 --------------------------------------------
154 (set-specifier has-modeline-p nil)
156 Starting with XEmacs 19.14 the modeline responds to mouse clicks, so
157 if you haven't liked or used the modeline in the past, you might want to
158 try the new version out.
161 File: xemacs-faq.info, Node: Q3.3.2, Next: Q3.3.3, Prev: Q3.3.1, Up: Customization
163 Q3.3.2: How do you have XEmacs display the line number in the modeline?
164 -----------------------------------------------------------------------
166 Add the following line to your `.emacs' file to display the line
171 Use the following to display the column number:
173 (column-number-mode 1)
175 Or select from the `Options' menu
176 `Customize->Emacs->Editing->Basics->Line Number Mode' and/or
177 `Customize->Emacs->Editing->Basics->Column Number Mode'
179 Or type `M-x customize <RET> editing-basics <RET>'.
182 File: xemacs-faq.info, Node: Q3.3.3, Next: Q3.3.4, Prev: Q3.3.2, Up: Customization
184 Q3.3.3: How do I get XEmacs to put the time of day on the modeline?
185 -------------------------------------------------------------------
187 Add the following line to your `.emacs' file to display the time:
191 See `Customize' from the `Options' menu for customization.
194 File: xemacs-faq.info, Node: Q3.3.4, Next: Q3.3.5, Prev: Q3.3.3, Up: Customization
196 Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
197 ----------------------------------------------------------------
199 With AUC TeX, fast typing is hard because the current chapter,
200 section etc. are given in the modeline. How can I turn this off?
202 It's not AUC TeX, it comes from `func-menu' in `func-menu.el'. Add
203 this code to your `.emacs' to turn it off:
205 (setq fume-display-in-modeline-p nil)
207 Or just add a hook to `TeX-mode-hook' to turn it off only for TeX
210 (add-hook 'TeX-mode-hook
211 '(lambda () (setq fume-display-in-modeline-p nil)))
213 David Hughes <dhughes@origin-at.co.uk> writes:
215 If you have 19.14 or later, try this instead; you'll still get the
216 function name displayed in the modeline, but it won't attempt to
217 keep track when you modify the file. To refresh when it gets out
218 of synch, you simply need click on the `Rescan Buffer' option in
221 (setq-default fume-auto-rescan-buffer-p nil)
224 File: xemacs-faq.info, Node: Q3.3.5, Next: Q3.4.1, Prev: Q3.3.4, Up: Customization
226 Q3.3.5: How can one change the modeline color based on the mode used?
227 ---------------------------------------------------------------------
229 You can use something like the following:
231 (add-hook 'lisp-mode-hook
233 (set-face-background 'modeline "red" (current-buffer))))
235 Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
236 colors change from the default set in your `.emacs'. The change will
237 only be made in the buffer you just entered (which contains the Lisp
238 file you are editing) and will not affect the modeline colors anywhere
243 * The hook is the mode name plus `-hook'. eg. c-mode-hook,
244 c++-mode-hook, emacs-lisp-mode-hook (used for your `.emacs' or a
245 `xx.el' file), lisp-interaction-mode-hook (the `*scratch*'
246 buffer), text-mode-hook, etc.
248 * Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
249 otherwise you will erase anything that anybody has already put on
252 * You can also do `(set-face-font 'modeline FONT)', eg.
253 `(set-face-font 'modeline "*bold-r-normal*140-100-100*"
254 (current-buffer))' if you wish the modeline font to vary based on
257 This works in 19.15 as well, but there are additional modeline faces,
258 `modeline-buffer-id', `modeline-mousable', and
259 `modeline-mousable-minor-mode', which you may want to customize.
262 File: xemacs-faq.info, Node: Q3.4.1, Next: Q3.4.2, Prev: Q3.3.5, Up: Customization
264 3.4: Multiple Device Support
265 ============================
267 Q3.4.1: How do I open a frame on another screen of my multi-headed display?
268 ---------------------------------------------------------------------------
270 The support for this was revamped for 19.14. Use the command `M-x
271 make-frame-on-display'. This command is also on the File menu in the
274 XEmacs 19.14 and later also have the command `make-frame-on-tty'
275 which will establish a connection to any tty-like device. Opening the
276 TTY devices should be left to `gnuclient', though.
279 File: xemacs-faq.info, Node: Q3.4.2, Next: Q3.5.1, Prev: Q3.4.1, Up: Customization
281 Q3.4.2: Can I really connect to a running XEmacs after calling up over a modem? How?
282 -------------------------------------------------------------------------------------
284 If you're not running at least XEmacs 19.14, you can't. Otherwise
285 check out the `gnuattach' program supplied with XEmacs. Starting with
286 XEmacs 20.3, `gnuattach' and `gnudoit' functionality is provided by
289 Also *Note Q5.0.12::.
292 File: xemacs-faq.info, Node: Q3.5.1, Next: Q3.5.2, Prev: Q3.4.2, Up: Customization
297 Q3.5.1: How can I bind complex functions (or macros) to keys?
298 -------------------------------------------------------------
300 As an example, say you want the `paste' key on a Sun keyboard to
301 insert the current Primary X selection at point. You can accomplish this
304 (define-key global-map [f18] 'x-insert-selection)
306 However, this only works if there is a current X selection (the
307 selection will be highlighted). The functionality I like is for the
308 `paste' key to insert the current X selection if there is one,
309 otherwise insert the contents of the clipboard. To do this you need to
310 pass arguments to `x-insert-selection'. This is done by wrapping the
311 call in a 'lambda form:
313 (global-set-key [f18]
314 (lambda () (interactive) (x-insert-selection t nil)))
316 This binds the f18 key to a "generic" functional object. The
317 interactive spec is required because only interactive functions can be
320 For the FAQ example you could use:
322 (global-set-key [(control ?.)]
323 (lambda () (interactive) (scroll-up 1)))
324 (global-set-key [(control ?;)]
325 (lambda () (interactive) (scroll-up -1)))
327 This is fine if you only need a few functions within the lambda body.
328 If you're doing more it's cleaner to define a separate function as in
329 question 3.5.3 (*note Q3.5.3::).
332 File: xemacs-faq.info, Node: Q3.5.2, Next: Q3.5.3, Prev: Q3.5.1, Up: Customization
334 Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
335 --------------------------------------------------------------------------------------
337 Add the following line to your `.emacs' file:
339 (setq next-line-add-newlines nil)
341 This has been the default setting in XEmacs for some time.
344 File: xemacs-faq.info, Node: Q3.5.3, Next: Q3.5.4, Prev: Q3.5.2, Up: Customization
346 Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
347 -----------------------------------------------------------------
349 Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
350 and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
352 (defun scroll-up-one-line ()
356 (defun scroll-down-one-line ()
360 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
361 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
363 The key point is that you can only bind simple functions to keys; you
364 can not bind a key to a function that you're also passing arguments to.
365 (*note Q3.5.1:: for a better answer).
368 File: xemacs-faq.info, Node: Q3.5.4, Next: Q3.5.5, Prev: Q3.5.3, Up: Customization
370 Q3.5.4: Globally binding `Delete'?
371 ----------------------------------
373 I cannot manage to globally bind my `Delete' key to something other
374 than the default. How does one do this?
378 (message "You hit DELETE"))
380 (global-set-key 'delete 'foo)
382 However, some modes explicitly bind `Delete', so you would need to
383 add a hook that does `local-set-key' for them. If what you want to do
384 is make the Backspace and Delete keys work more PC/Motif-like, then
385 take a look at the `delbs.el' package.
387 New in XEmacs 19.14 is a variable called `key-translation-map' which
388 makes it easier to bind `Delete'. `delbs.el' is a good example of how
389 to do this correctly.
391 Also *Note Q3.5.10::.
394 File: xemacs-faq.info, Node: Q3.5.5, Next: Q3.5.6, Prev: Q3.5.4, Up: Customization
396 Q3.5.5: Scrolling one line at a time.
397 -------------------------------------
399 Can the cursor keys scroll the screen a line at a time, rather than
400 the default half page jump? I tend it to find it disorienting.
404 (defun scroll-one-line-up (&optional arg)
405 "Scroll the selected window up (forward in the text) one line (or N lines)."
407 (scroll-up (or arg 1)))
409 (defun scroll-one-line-down (&optional arg)
410 "Scroll the selected window down (backward in the text) one line (or N)."
412 (scroll-down (or arg 1)))
414 (global-set-key [up] 'scroll-one-line-up)
415 (global-set-key [down] 'scroll-one-line-down)
417 The following will also work but will affect more than just the
418 cursor keys (i.e. `C-n' and `C-p'):
422 Starting with XEmacs-20.3 you can also change this with Customize.
423 Select from the `Options' menu
424 `Customize->Emacs->Environment->Windows->Scroll Step...' or type `M-x
425 customize <RET> windows <RET>'.
428 File: xemacs-faq.info, Node: Q3.5.6, Next: Q3.5.7, Prev: Q3.5.5, Up: Customization
430 Q3.5.6: How to map `Help' key alone on Sun type4 keyboard?
431 ----------------------------------------------------------
433 The following works in GNU Emacs 19:
435 (global-set-key [help] 'help-command);; Help
437 The following works in XEmacs 19.15 with the addition of shift:
439 (global-set-key [(shift help)] 'help-command);; Help
441 But it doesn't work alone. This is in the file `PROBLEMS' which
442 should have come with your XEmacs installation: _Emacs ignores the
443 `help' key when running OLWM_.
445 OLWM grabs the `help' key, and retransmits it to the appropriate
446 client using `XSendEvent'. Allowing Emacs to react to synthetic events
447 is a security hole, so this is turned off by default. You can enable
448 it by setting the variable `x-allow-sendevents' to t. You can also
449 cause fix this by telling OLWM to not grab the help key, with the null
450 binding `OpenWindows.KeyboardCommand.Help:'.
453 File: xemacs-faq.info, Node: Q3.5.7, Next: Q3.5.8, Prev: Q3.5.6, Up: Customization
455 Q3.5.7: How can you type in special characters in XEmacs?
456 ---------------------------------------------------------
458 One way is to use the package `x-compose'. Then you can use
459 sequences like `Compose " a' to get ä, etc.
461 Another way is to use the `iso-insert' package, provided in XEmacs
462 19.15 and later. Then you can use sequences like `C-x 8 " a' to get ä,
465 Glynn Clements <glynn@sensei.co.uk> writes:
467 It depends upon your X server.
469 Generally, the simplest way is to define a key as Multi_key with
471 xmodmap -e 'keycode 0xff20 = Multi_key'
473 You will need to pick an appropriate keycode. Use xev to find out
474 the keycodes for each key.
476 [NB: On a `Windows' keyboard, recent versions of XFree86
477 automatically define the right `Windows' key as Multi_key'.]
479 Once you have Multi_key defined, you can use e.g.
486 Also, recent versions of XFree86 define various AltGr-<key>
487 combinations as dead keys, i.e.
488 AltGr [ => dead_diaeresis
489 AltGr ] => dead_tilde
490 AltGr ; => dead_acute
493 Running `xmodmap -pk' will list all of the defined keysyms.
496 File: xemacs-faq.info, Node: Q3.5.8, Next: Q3.5.9, Prev: Q3.5.7, Up: Customization
498 Q3.5.8: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
499 ---------------------------------------------------------------------------
501 Why does `(define-key global-map [ delete-forward ] 'delete-char)'
502 complain of not being able to bind an unknown key?
506 (define-key global-map [delete_forward] 'delete-char)
510 What you are seeing above is a bug due to code that is trying to
511 check for GNU Emacs syntax like:
513 (define-key global-map [C-M-a] 'delete-char)
515 which otherwise would cause no errors but would not result in the
518 This bug has been fixed in 19.14.
521 File: xemacs-faq.info, Node: Q3.5.9, Next: Q3.5.10, Prev: Q3.5.8, Up: Customization
523 Q3.5.9: How do I make the Delete key delete forward?
524 ----------------------------------------------------
526 With XEmacs-20.2 use the `delbs' package:
530 This will give you the functions `delbs-enable-delete-forward' to
531 set things up, and `delbs-disable-delete-forward' to revert to "normal"
532 behavior. Note that `delbackspace' package is obsolete.
534 Starting with XEmacs-20.3 better solution is to set variable
535 `delete-key-deletes-forward' to t. You can also change this with
536 Customize. Select from the `Options' menu
537 `Customize->Emacs->Editing->Basics->Delete Key Deletes Forward' or type
538 `M-x customize <RET> editing-basics <RET>'.
543 File: xemacs-faq.info, Node: Q3.5.10, Next: Q3.5.11, Prev: Q3.5.9, Up: Customization
545 Q3.5.10: Can I turn on "sticky" modifier keys?
546 ----------------------------------------------
548 Yes, with `(setq modifier-keys-are-sticky t)'. This will give the
549 effect of being able to press and release Shift and have the next
550 character typed come out in upper case. This will affect all the other
551 modifier keys like Control and Meta as well.
553 Ben Wing <ben@xemacs.org> writes:
555 One thing about the sticky modifiers is that if you move the mouse
556 out of the frame and back in, it cancels all currently "stuck"
560 File: xemacs-faq.info, Node: Q3.5.11, Next: Q3.6.1, Prev: Q3.5.10, Up: Customization
562 Q3.5.11: How do I map the arrow keys?
563 -------------------------------------
565 Say you want to map `C-<right>' to forward-word:
567 Sam Steingold <sds@usa.net> writes:
569 ; both XEmacs and Emacs
570 (define-key global-map [(control right)] 'forward-word)
573 (define-key global-map [C-right] 'forward-word)
576 (define-key global-map (kbd "C-<right>") 'forward-word)
579 File: xemacs-faq.info, Node: Q3.6.1, Next: Q3.6.2, Prev: Q3.5.11, Up: Customization
584 Q3.6.1: Is there a way to make the bar cursor thicker?
585 ------------------------------------------------------
587 I'd like to have the bar cursor a little thicker, as I tend to
590 For a 1 pixel bar cursor, use:
594 For a 2 pixel bar cursor, use:
596 (setq bar-cursor 'anything-else)
598 Starting with XEmacs-20.3 you can also change these with Customize.
599 Select from the `Options' menu
600 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
601 customize <RET> display <RET>'.
603 You can use a color to make it stand out better:
605 Emacs*cursorColor: Red
608 File: xemacs-faq.info, Node: Q3.6.2, Next: Q3.6.3, Prev: Q3.6.1, Up: Customization
610 Q3.6.2: Is there a way to get back the block cursor?
611 ----------------------------------------------------
613 (setq bar-cursor nil)
615 Starting with XEmacs-20.3 you can also change this with Customize.
616 Select from the `Options' menu
617 `Customize->Emacs->Environment->Display->Bar Cursor...' or type `M-x
618 customize <RET> display <RET>'.
621 File: xemacs-faq.info, Node: Q3.6.3, Next: Q3.7.1, Prev: Q3.6.2, Up: Customization
623 Q3.6.3: Can I make the cursor blink?
624 ------------------------------------
626 If you are running a version of XEmacs older than 19.14, no.
627 Otherwise you can do the following:
631 This function toggles between a steady cursor and a blinking cursor.
632 You may also set this mode from the menu bar by selecting `Options =>
633 Frame Appearance => Blinking Cursor'. Remember to save options.
636 File: xemacs-faq.info, Node: Q3.7.1, Next: Q3.7.2, Prev: Q3.6.3, Up: Customization
638 3.7: The Mouse and Highlighting
639 ===============================
641 Q3.7.1: How can I turn off Mouse pasting?
642 -----------------------------------------
644 I keep hitting the middle mouse button by accident and getting stuff
645 pasted into my buffer so how can I turn this off?
647 Here is an alternative binding, whereby the middle mouse button
648 selects (but does not cut) the expression under the mouse. Clicking
649 middle on a left or right paren will select to the matching one. Note
650 that you can use `define-key' or `global-set-key'.
652 (defun mouse-set-point-and-select (event)
653 "Sets the point at the mouse location, then marks following form"
655 (mouse-set-point event)
657 (define-key global-map [button2] 'mouse-set-point-and-select)
660 File: xemacs-faq.info, Node: Q3.7.2, Next: Q3.7.3, Prev: Q3.7.1, Up: Customization
662 Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
663 -----------------------------------------------------------------
665 Use, for instance, `[(meta button1)]'. For example, here is a common
666 setting for Common Lisp programmers who use the bundled `ilisp'
667 package, whereby meta-button1 on a function name will find the file
668 where the function name was defined, and put you at that location in
671 [Inside a function that gets called by the lisp-mode-hook and
674 (local-set-key [(meta button1)] 'edit-definitions-lisp)
677 File: xemacs-faq.info, Node: Q3.7.3, Next: Q3.7.4, Prev: Q3.7.2, Up: Customization
679 Q3.7.3: Clicking the left button does not do anything in buffer list.
680 ---------------------------------------------------------------------
682 I do `C-x C-b' to get a list of buffers and the entries get
683 highlighted when I move the mouse over them but clicking the left mouse
684 does not do anything.
686 Use the middle mouse button.
689 File: xemacs-faq.info, Node: Q3.7.4, Next: Q3.7.5, Prev: Q3.7.3, Up: Customization
691 Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
692 ------------------------------------------------------------------
694 The following code will replace the default popup on button3:
696 (global-set-key [button3] 'popup-buffer-menu)
699 File: xemacs-faq.info, Node: Q3.7.5, Next: Q3.7.6, Prev: Q3.7.4, Up: Customization
701 Q3.7.5: Why does cut-and-paste not work between XEmacs and a cmdtool?
702 ---------------------------------------------------------------------
704 We don't know. It's a bug. There does seem to be a work-around,
705 however. Try running xclipboard first. It appears to fix the problem
706 even if you exit it. (This should be mostly fixed in 19.13, but we
707 haven't yet verified that).
710 File: xemacs-faq.info, Node: Q3.7.6, Next: Q3.7.7, Prev: Q3.7.5, Up: Customization
712 Q3.7.6: How I can set XEmacs up so that it pastes where the text cursor is?
713 ---------------------------------------------------------------------------
715 By default XEmacs pastes X selections where the mouse pointer is.
716 How do I disable this?
718 Examine the function `mouse-yank', by typing `C-h f mouse-yank
721 To get XEmacs to paste at the text cursor, add this your `.emacs':
723 (setq mouse-yank-at-point t)
725 Starting with XEmacs-20.2 you can also change this with Customize.
726 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Yank
727 At Point...' or type `M-x customize <RET> mouse <RET>'.
730 File: xemacs-faq.info, Node: Q3.7.7, Next: Q3.7.8, Prev: Q3.7.6, Up: Customization
732 Q3.7.7: How do I select a rectangular region?
733 ---------------------------------------------
735 Just select the region normally, then use the rectangle commands
736 (e.g. `kill-rectangle' on it. The region does not highlight as a
737 rectangle, but the commands work just fine.
739 To actually sweep out rectangular regions with the mouse you can use
740 `mouse-track-do-rectangle' which is assigned to `M-button1'. Then use
743 You can also do the following to change default behavior to sweep out
746 (setq mouse-track-rectangle-p t)
748 Starting with XEmacs-20.2 you can also change this with Customize.
749 Select from the `Options' menu `Customize->Emacs->Editing->Mouse->Track
750 Rectangle...' or type `M-x customize <RET> mouse <RET>'.
752 mouse-track-do-rectangle: (event)
753 -- an interactive compiled Lisp function.
754 Like `mouse-track' but selects rectangles instead of regions.
757 File: xemacs-faq.info, Node: Q3.7.8, Next: Q3.8.1, Prev: Q3.7.7, Up: Customization
759 Q3.7.8: Why does `M-w' take so long?
760 ------------------------------------
762 It actually doesn't. It leaves the region visible for a second so
763 that you can see what area is being yanked. If you start working,
764 though, it will immediately complete its operation. In other words, it
765 will only delay for a second if you let it.
768 File: xemacs-faq.info, Node: Q3.8.1, Next: Q3.8.2, Prev: Q3.7.8, Up: Customization
770 3.8: The Menubar and Toolbar
771 ============================
773 Q3.8.1: How do I get rid of the menu (or menubar)?
774 --------------------------------------------------
776 If you are running XEmacs 19.13 and earlier, add this command to your
781 Starting with XEmacs 19.14 the preferred method is:
783 (set-specifier menubar-visible-p nil)
786 File: xemacs-faq.info, Node: Q3.8.2, Next: Q3.8.3, Prev: Q3.8.1, Up: Customization
788 Q3.8.2: Can I customize the basic menubar?
789 ------------------------------------------
791 For an extensive menubar, add this line to your `.emacs':
795 If you'd like to write your own, this file provides as good a set of
796 examples as any to start from. The file is located in
797 `lisp/packages/big-menubar.el' in the XEmacs installation directory.
800 File: xemacs-faq.info, Node: Q3.8.3, Next: Q3.8.4, Prev: Q3.8.2, Up: Customization
802 Q3.8.3: How do I control how many buffers are listed in the menu `Buffers List'?
803 --------------------------------------------------------------------------------
805 Add the following to your `.emacs' (suit to fit):
807 (setq buffers-menu-max-size 20)
809 For no limit, use an argument of `nil'.
811 Starting with XEmacs-20.3 you can also change this with Customize.
812 Select from the `Options' menu
813 `Customize->Emacs->Environment->Menu->Buffers Menu->Max Size...' or
814 type `M-x customize <RET> buffers-menu <RET>'.
817 File: xemacs-faq.info, Node: Q3.8.4, Next: Q3.8.5, Prev: Q3.8.3, Up: Customization
819 Q3.8.4: Resources like `Emacs*menubar*font' are not working?
820 ------------------------------------------------------------
822 I am trying to use a resource like `Emacs*menubar*font' to set the
823 font of the menubar but it's not working.
825 If you are using the real Motif menubar, this resource is not
826 recognized; you have to say:
828 Emacs*menubar*fontList: FONT
830 If you are using the Lucid menubar, the former resource will be
831 recognized only if the latter resource is unset. This means that the
838 Emacs*menubar*font: FONT
840 even though the latter is more specific.
843 File: xemacs-faq.info, Node: Q3.8.5, Next: Q3.9.1, Prev: Q3.8.4, Up: Customization
845 Q3.8.5: How can I bind a key to a function to toggle the toolbar?
846 -----------------------------------------------------------------
850 (defun my-toggle-toolbar ()
852 (set-specifier default-toolbar-visible-p
853 (not (specifier-instance default-toolbar-visible-p))))
854 (global-set-key "\C-xT" 'my-toggle-toolbar)
856 There are redisplay bugs in 19.14 that may make the preceding result
857 in a messed-up display, especially for frames with multiple windows.
858 You may need to resize the frame before XEmacs completely realizes the
859 toolbar is really gone.
861 Thanks to Martin Buchholz <martin@xemacs.org> for the correct code.
864 File: xemacs-faq.info, Node: Q3.9.1, Next: Q3.9.2, Prev: Q3.8.5, Up: Customization
869 Q3.9.1: How can I disable the scrollbar?
870 ----------------------------------------
872 To disable them for all frames, add the following line to your
875 Emacs.scrollBarWidth: 0
877 Or select from the `Options' menu `Frame Appearance->Scrollbars'.
878 Remember to save options.
880 To turn the scrollbar off on a per-frame basis, use the following
883 (set-specifier scrollbar-width 0 (selected-frame))
885 You can actually turn the scrollbars on at any level you want by
886 substituting for (selected-frame) in the above command. For example, to
887 turn the scrollbars off only in a single buffer:
889 (set-specifier scrollbar-width 0 (current-buffer))
891 In XEmacs versions prior to 19.14, you had to use the hairier
894 (set-specifier scrollbar-width (cons (selected-frame) 0))
897 File: xemacs-faq.info, Node: Q3.9.2, Next: Q3.9.3, Prev: Q3.9.1, Up: Customization
899 Q3.9.2: How can one use resources to change scrollbar colors?
900 -------------------------------------------------------------
902 Here's a recap of how to use resources to change your scrollbar
907 Emacs*XmScrollBar.Background: skyblue
908 Emacs*XmScrollBar.troughColor: lightgray
912 Emacs*Scrollbar.Foreground: skyblue
913 Emacs*Scrollbar.Background: lightgray
915 Note the capitalization of `Scrollbar' for the Athena widget.
918 File: xemacs-faq.info, Node: Q3.9.3, Next: Q3.9.4, Prev: Q3.9.2, Up: Customization
920 Q3.9.3: Moving the scrollbar can move the point; can I disable this?
921 --------------------------------------------------------------------
923 When I move the scrollbar in an XEmacs window, it moves the point as
924 well, which should not be the default behavior. Is this a bug or a
925 feature? Can I disable it?
927 The current behavior is a feature, not a bug. Point remains at the
928 same buffer position as long as that position does not scroll off the
929 screen. In that event, point will end up in either the upper-left or
930 lower-left hand corner.
932 This cannot be changed.
935 File: xemacs-faq.info, Node: Q3.9.4, Next: Q3.10.1, Prev: Q3.9.3, Up: Customization
937 Q3.9.4: How can I get automatic horizontal scrolling?
938 -----------------------------------------------------
940 By the same token, how can I turn it off in specific modes?
942 To do this, add to your `.emacs' file:
946 Then do `(setq truncate-lines t)' in the mode-hooks for any modes in
947 which you want lines truncated.
949 More precisely: If `truncate-lines' is nil, horizontal scrollbars
950 will never appear. Otherwise, they will appear only if the value of
951 `scrollbar-height' for that buffer/window/etc. is non-zero. If you do
953 (set-specifier scrollbar-height 0)
955 then horizontal scrollbars will not appear in truncated buffers
956 unless the package specifically asked for them.
958 Automatic horizontal scrolling is now standard, starting with 19.14.
961 File: xemacs-faq.info, Node: Q3.10.1, Next: Q3.10.2, Prev: Q3.9.4, Up: Customization
963 3.10: Text Selections
964 =====================
966 Q3.10.1: How can I turn off or change highlighted selections?
967 -------------------------------------------------------------
969 The `zmacs' mode allows for what some might call gratuitous
970 highlighting for selected regions (either by setting mark or by using
971 the mouse). This is the default behavior. To turn off, add the
972 following line to your `.emacs' file:
974 (setq zmacs-regions nil)
976 Starting with XEmacs-20.2 you can also change this with Customize.
977 Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
978 Regions' or type `M-x customize <RET> editing-basics <RET>'.
980 To change the face for selection, look at `Options->Customize' on
984 File: xemacs-faq.info, Node: Q3.10.2, Next: Q3.10.3, Prev: Q3.10.1, Up: Customization
986 Q3.10.2: How do I get that typing on an active region removes it?
987 -----------------------------------------------------------------
989 I want to change things so that if I select some text and start
990 typing, the typed text replaces the selected text, similar to Motif.
992 You want to use something called "pending delete". Pending delete
993 is what happens when you select a region (with the mouse or keyboard)
994 and you press a key to replace the selected region by the key you typed.
995 Usually backspace kills the selected region.
997 To get this behavior, add the following lines to your `.emacs':
1000 ((fboundp 'turn-on-pending-delete)
1001 (turn-on-pending-delete))
1002 ((fboundp 'pending-delete-on)
1003 (pending-delete-on t)))
1005 Note that this will work with both Backspace and Delete. This code
1006 is a tad more complicated than it has to be for XEmacs in order to make
1010 File: xemacs-faq.info, Node: Q3.10.3, Next: Q3.10.4, Prev: Q3.10.2, Up: Customization
1012 Q3.10.3: Can I turn off the highlight during isearch?
1013 -----------------------------------------------------
1015 I do not like my text highlighted while I am doing isearch as I am
1016 not able to see what's underneath. How do I turn it off?
1018 Put the following in your `.emacs':
1020 (setq isearch-highlight nil)
1022 Starting with XEmacs-20.2 you can also change this with Customize.
1023 Type `M-x customize-variable <RET> isearch-highlight <RET>'.
1025 Note also that isearch-highlight affects query-replace and ispell.
1026 Instead of disabling isearch-highlight you may find that a better
1027 solution consists of customizing the `isearch' face.
1030 File: xemacs-faq.info, Node: Q3.10.4, Next: Q3.10.5, Prev: Q3.10.3, Up: Customization
1032 Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
1033 --------------------------------------------------------------------
1035 Put this in your `.emacs':
1037 (setq zmacs-regions nil)
1039 *Warning: This command turns off all region highlighting.*
1041 Also *Note Q3.10.1::.
1044 File: xemacs-faq.info, Node: Q3.10.5, Prev: Q3.10.4, Up: Customization
1046 Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
1047 ----------------------------------------------------------------------------
1049 This has been fixed by default starting with XEmacs-20.3.
1051 With older versions you can turn this feature (if it indeed is a
1052 feature) off like this:
1054 (defadvice scroll-up (around scroll-up freeze)
1056 (let ((zmacs-region-stays t))
1060 (end-of-buffer (goto-char (point-max))))
1063 (defadvice scroll-down (around scroll-down freeze)
1065 (let ((zmacs-region-stays t))
1069 (beginning-of-buffer (goto-char (point-min))))
1072 Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
1076 File: xemacs-faq.info, Node: Subsystems, Next: Miscellaneous, Prev: Customization, Up: Top
1081 This is part 4 of the XEmacs Frequently Asked Questions list. This
1082 section is devoted to major XEmacs subsystems.
1086 Reading Mail with VM:
1087 * Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
1088 * Q4.0.2:: How do I get VM to filter mail for me?
1089 * Q4.0.3:: How can I get VM to automatically check for new mail?
1090 * Q4.0.4:: [This question intentionally left blank]
1091 * Q4.0.5:: How do I get my outgoing mail archived?
1092 * 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"?
1093 * Q4.0.7:: Is there a mailing list or FAQ for VM?
1094 * Q4.0.8:: Remote mail reading with VM.
1095 * Q4.0.9:: rmail or VM gets an error incorporating new mail.
1096 * Q4.0.10:: How do I make VM stay in a single frame?
1097 * Q4.0.11:: How do I make VM or mh-e display graphical smilies?
1098 * Q4.0.12:: Customization of VM not covered in the manual or here.
1100 Web browsing with W3:
1101 * Q4.1.1:: What is W3?
1102 * Q4.1.2:: How do I run W3 from behind a firewall?
1103 * Q4.1.3:: Is it true that W3 supports style sheets and tables?
1105 Reading Netnews and Mail with Gnus:
1106 * Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
1107 * Q4.2.2:: [This question intentionally left blank]
1108 * Q4.2.3:: How do I make Gnus stay within a single frame?
1109 * Q4.2.4:: How do I customize the From: line?
1112 * Q4.3.1:: How can I read and/or compose MIME messages?
1113 * Q4.3.2:: What is TM and where do I get it?
1114 * Q4.3.3:: Why isn't this `movemail' program working?
1115 * Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
1116 * Q4.3.5:: Where do I find pstogif (required by tm)?
1118 Sparcworks, EOS, and WorkShop:
1119 * Q4.4.1:: What is SPARCworks, EOS, and WorkShop
1120 * Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21?
1123 * Q4.5.1:: What is/was Energize?
1126 * Q4.6.1:: What is Infodock?
1128 Other Unbundled Packages:
1129 * Q4.7.1:: What is AUC TeX? Where do you get it?
1130 * Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
1131 * Q4.7.3:: [This question intentionally left blank]
1132 * Q4.7.4:: Problems installing AUC TeX
1133 * Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs?
1134 * Q4.7.6:: Is there a MatLab mode?
1137 File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Subsystems, Up: Subsystems
1139 4.0: Reading Mail with VM
1140 =========================
1142 Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
1143 -------------------------------------------------------------------------
1145 Use `vm-spool-files', like this for example:
1147 (setq vm-spool-files '("/var/spool/mail/wing"
1148 "netcom23.netcom.com:110:pass:wing:MYPASS"))
1150 Of course substitute your actual password for MYPASS.
1153 File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Subsystems
1155 Q4.0.2: How do I get VM to filter mail for me?
1156 ----------------------------------------------
1158 One possibility is to use procmail to split your mail before it gets
1159 to VM. I prefer this personally, since there are many strange and
1160 wonderful things one can do with procmail. Procmail may be found at
1161 `ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
1163 Also see the Mail Filtering FAQ at:
1164 `ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
1167 File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Subsystems
1169 Q4.0.3: How can I get VM to automatically check for new mail?
1170 -------------------------------------------------------------
1172 John Turner <turner@lanl.gov> writes:
1176 (setq vm-auto-get-new-mail 60)
1179 File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Subsystems
1181 Q4.0.4: [This question intentionally left blank]
1182 ------------------------------------------------
1184 Obsolete question, left blank to avoid renumbering.
1187 File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Subsystems
1189 Q4.0.5: How do I get my outgoing mail archived?
1190 -----------------------------------------------
1192 (setq mail-archive-file-name "~/outbox")
1195 File: xemacs-faq.info, Node: Q4.0.6, Next: Q4.0.7, Prev: Q4.0.5, Up: Subsystems
1197 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"?
1198 ---------------------------------------------------------------------------------------------------------------------
1200 Set `vm-reply-ignored-addresses' to a list, like
1202 (setq vm-reply-ignored-addresses
1203 '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
1204 "wing@netcom.com" "wing@xemacs.org"))
1206 Note that each string is a regular expression.
1209 File: xemacs-faq.info, Node: Q4.0.7, Next: Q4.0.8, Prev: Q4.0.6, Up: Subsystems
1211 Q4.0.7: Is there a mailing list or FAQ for VM?
1212 ----------------------------------------------
1214 A FAQ for VM exists at `http://www.cyberpass.net/~gorkab/vmfaq.htm'.
1216 VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
1219 File: xemacs-faq.info, Node: Q4.0.8, Next: Q4.0.9, Prev: Q4.0.7, Up: Subsystems
1221 Q4.0.8: Remote mail reading with VM.
1222 ------------------------------------
1224 My mailbox lives at the office on a big honkin server. My regular
1225 INBOX lives on my honkin desktop machine. I now can PPP to the office
1226 from home which is far from honking... I'd like to be able to read
1227 mail at home without storing it here and I'd like to use xemacs and VM
1228 at home... Is there a recommended setup?
1230 Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
1232 There are several ways to do this.
1234 1. Set your display to your home machine and run dxpc or one of
1235 the other X compressors.
1237 2. NFS mount your desktop machine on your home machine and
1238 modify your pop command on your home machine to rsh to your
1239 desktop machine and actually do the pop get's.
1241 3. Run a POP server on your desktop machine as well and do a
1242 sort of two tiered POP get.
1244 William Perry <wmperry@monolith.spry.com> adds:
1246 Or you could run a pop script periodically on your desktop
1247 machine, and just use ange-ftp or NFS to get to your mailbox. I
1248 used to do this all the time back at IU.
1251 File: xemacs-faq.info, Node: Q4.0.9, Next: Q4.0.10, Prev: Q4.0.8, Up: Subsystems
1253 Q4.0.9: rmail or VM gets an error incorporating new mail.
1254 ---------------------------------------------------------
1256 Quoting the XEmacs PROBLEMS file:
1258 rmail and VM get new mail from `/usr/spool/mail/$USER' using a
1259 program called `movemail'. This program interlocks with
1260 `/bin/mail' using the protocol defined by `/bin/mail'.
1262 There are two different protocols in general use. One of them
1263 uses the `flock' system call. The other involves creating a lock
1264 file; `movemail' must be able to write in `/usr/spool/mail' in
1265 order to do this. You control which one is used by defining, or
1266 not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
1267 or s- file it includes.
1269 *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
1270 SYSTEM, YOU CAN LOSE MAIL!*
1272 If your system uses the lock file protocol, and fascist
1273 restrictions prevent ordinary users from writing the lock files in
1274 `/usr/spool/mail', you may need to make `movemail' setgid to a
1275 suitable group such as `mail'. You can use these commands (as
1281 If your system uses the lock file protocol, and fascist
1282 restrictions prevent ordinary users from writing the lock files in
1283 `/usr/spool/mail', you may need to make `movemail' setgid to a
1284 suitable group such as `mail'. To do this, use the following
1285 commands (as root) after doing the make install.
1290 Installation normally copies movemail from the build directory to
1291 an installation directory which is usually under `/usr/local/lib'.
1292 The installed copy of `movemail' is usually in the directory
1293 `/usr/local/lib/emacs/VERSION/TARGET'. You must change the group
1294 and mode of the installed copy; changing the group and mode of the
1295 build directory copy is ineffective.
1298 File: xemacs-faq.info, Node: Q4.0.10, Next: Q4.0.11, Prev: Q4.0.9, Up: Subsystems
1300 Q4.0.10: How do I make VM stay in a single frame?
1301 -------------------------------------------------
1303 John.John S Cooper <Cooper@Eng.Sun.COM> writes:
1305 ; Don't use multiple frames
1306 (setq vm-frame-per-composition nil)
1307 (setq vm-frame-per-folder nil)
1308 (setq vm-frame-per-edit nil)
1309 (setq vm-frame-per-summary nil)
1312 File: xemacs-faq.info, Node: Q4.0.11, Next: Q4.0.12, Prev: Q4.0.10, Up: Subsystems
1314 Q4.0.11: How do I make VM or mh-e display graphical smilies?
1315 ------------------------------------------------------------
1317 For mh-e use the following:
1319 (add-hook 'mh-show-mode-hook '(lambda ()
1320 (smiley-region (point-min)
1323 WJCarpenter <bill@carpenter.ORG> writes: For VM use the following:
1324 (autoload 'smiley-region "smiley" nil t)
1325 (add-hook 'vm-select-message-hook
1327 (smiley-region (point-min)
1330 For tm use the following:
1331 (autoload 'smiley-buffer "smiley" nil t)
1332 (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
1335 File: xemacs-faq.info, Node: Q4.0.12, Next: Q4.1.1, Prev: Q4.0.11, Up: Subsystems
1337 Q4.0.12: Customization of VM not covered in the manual, or here.
1338 ----------------------------------------------------------------
1340 giacomo boffi <boffi@hp735.stru.polimi.it> writes:
1342 The meta-answer is to look into the file `vm-vars.el', in the vm
1343 directory of the lisp library.
1345 `vm-vars.el' contains, initializes and carefully describes, with
1346 examples of usage, the plethora of user options that _fully_
1347 control VM's behavior.
1349 Enter vm-vars, `forward-search' for toolbar, find the variables
1350 that control the toolbar placement, appearance, existence, copy to
1351 your `.emacs' or `.vm' and modify according to the detailed
1354 The above also applies to all the various features of VM: search
1355 for some keywords, maybe the first you conjure isn't appropriate,
1356 find the appropriate variables, copy and experiment.
1359 File: xemacs-faq.info, Node: Q4.1.1, Next: Q4.1.2, Prev: Q4.0.12, Up: Subsystems
1361 4.1: Web browsing with W3
1362 =========================
1367 W3 is an advanced graphical browser written in Emacs lisp that runs
1368 on XEmacs. It has full support for cascaded style sheets, and more...
1370 It has a home web page at
1371 `http://www.cs.indiana.edu/elisp/w3/docs.html'.
1374 File: xemacs-faq.info, Node: Q4.1.2, Next: Q4.1.3, Prev: Q4.1.1, Up: Subsystems
1376 Q4.1.2: How do I run W3 from behind a firewall?
1377 -----------------------------------------------
1379 There is a long, well-written, detailed section in the W3 manual that
1380 describes how to do this. Look in the section entitled "Firewalls".
1383 File: xemacs-faq.info, Node: Q4.1.3, Next: Q4.2.1, Prev: Q4.1.2, Up: Subsystems
1385 Q4.1.3: Is it true that W3 supports style sheets and tables?
1386 ------------------------------------------------------------
1388 Yes, and much more. W3, as distributed with the latest XEmacs is a
1389 full-featured web browser.
1392 File: xemacs-faq.info, Node: Q4.2.1, Next: Q4.2.2, Prev: Q4.1.3, Up: Subsystems
1394 4.2: Reading Netnews and Mail with Gnus
1395 =======================================
1397 Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
1398 --------------------------------------------------------------------------------
1400 The Gnus numbering issues are not meant for mere mortals to know
1401 them. If you feel you _must_ enter the muddy waters of Gnus, visit the
1402 excellent FAQ, maintained by Justin Sheehy, at:
1404 `http://www.ccs.neu.edu/software/contrib/gnus/'
1406 See also Gnus home page
1407 `http://www.gnus.org/'
1410 File: xemacs-faq.info, Node: Q4.2.2, Next: Q4.2.3, Prev: Q4.2.1, Up: Subsystems
1412 Q4.2.2: This question intentionally left blank.
1413 -----------------------------------------------
1415 Obsolete question, left blank to avoid renumbering.