1 This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
2 1.68 from the input file xemacs-faq.texi.
4 INFO-DIR-SECTION XEmacs Editor
6 * FAQ: (xemacs-faq). XEmacs FAQ.
10 File: xemacs-faq.info, Node: Q5.0.20, Next: Q5.1.1, Prev: Q5.0.19, Up: Miscellaneous
12 Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
13 ---------------------------------------------------------------------------------------------------------
15 Jan Vroonhof <vroonhof@math.ethz.ch> writes:
16 Here is one of the solutions, we have this in a script called
19 if gnuclient -batch -eval t >/dev/null 2>&1
21 exec gnuclient ${1+"$@"}
23 xemacs -unmapped -f gnuserv-start &
24 until gnuclient -batch -eval t >/dev/null 2>&1
28 exec gnuclient ${1+"$@"}
31 Note that there is a known problem when running XEmacs and
32 'gnuclient -nw' on the same TTY.
35 File: xemacs-faq.info, Node: Q5.1.1, Next: Q5.1.2, Prev: Q5.0.20, Up: Miscellaneous
37 5.1: Emacs Lisp Programming Techniques
38 ======================================
40 Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
41 -----------------------------------------------------------------------------
43 Erik Naggum <clerik@naggum.no> writes;
45 Emacs has a legacy of keyboards that produced characters with
46 modifier bits, and therefore map a variety of input systems into
47 this scheme even today. XEmacs is instead optimized for X events.
48 This causes an incompatibility in the way key sequences are
49 specified, but both Emacs and XEmacs will accept a key sequence as
50 a vector of lists of modifiers that ends with a key, e.g., to bind
51 `M-C-a', you would say `[(meta control a)]' in both Emacsen.
52 XEmacs has an abbreviated form for a single key, just (meta
53 control a). Emacs has an abbreviated form for the Control and the
54 Meta modifiers to string-characters (the ASCII characters), as in
55 `\M-\C-a'. XEmacs users need to be aware that the abbreviated
56 form works only for one-character key sequences, while Emacs users
57 need to be aware that the string-character is rather limited.
58 Specifically, the string-character can accommodate only 256
59 different values, 128 of which have the Meta modifier and 128 of
60 which have not. In each of these blocks, only 32 characters have
61 the Control modifier. Whereas `[(meta control A)]' differs from
62 `[(meta control a)]' because the case differs, `\M-\C-a' and
63 `\M-\C-A' do not. Programmers are advised to use the full common
64 form, both because it is more readable and less error-prone, and
65 because it is supported by both Emacsen.
67 Another (even safer) way to be sure of the key-sequences is to use
68 the `read-kbd-macro' function, which takes a string like `C-c <up>',
69 and converts it to the internal key representation of the Emacs you
70 use. The function is available both on XEmacs and GNU Emacs.
73 File: xemacs-faq.info, Node: Q5.1.2, Next: Q5.1.3, Prev: Q5.1.1, Up: Miscellaneous
75 Q5.1.2: Can I generate "fake" keyboard events?
76 ----------------------------------------------
78 I wonder if there is an interactive function that can generate
79 "fake" keyboard events. This way, I could simply map them inside
84 (defun cg--generate-char-event (ch)
85 "Generate an event, as if ch has been typed"
86 (dispatch-event (character-to-event ch)))
88 ;; Backspace and Delete stuff
89 (global-set-key [backspace]
90 (lambda () (interactive) (cg--generate-char-event 127)))
91 (global-set-key [unknown_keysym_0x4]
92 (lambda () (interactive) (cg--generate-char-event 4)))
95 File: xemacs-faq.info, Node: Q5.1.3, Next: Q5.1.4, Prev: Q5.1.2, Up: Miscellaneous
97 Q5.1.3: Could you explain `read-kbd-macro' in more detail?
98 ----------------------------------------------------------
100 The `read-kbd-macro' function returns the internal Emacs
101 representation of a human-readable string (which is its argument).
104 (read-kbd-macro "C-c C-a")
105 => [(control ?c) (control ?a)]
107 (read-kbd-macro "C-c C-. <up>")
108 => [(control ?c) (control ?.) up]
110 In GNU Emacs the same forms will be evaluated to what GNU Emacs
111 understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
114 The exact "human-readable" syntax is defined in the docstring of
115 `edmacro-mode'. I'll repeat it here, for completeness.
117 Format of keyboard macros during editing:
119 Text is divided into "words" separated by whitespace. Except for
120 the words described below, the characters of each word go directly
121 as characters of the macro. The whitespace that separates words is
122 ignored. Whitespace in the macro must be written explicitly, as in
123 `foo <SPC> bar <RET>'.
125 * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
126 and `NUL' represent special control characters. The words
127 must be written in uppercase.
129 * A word in angle brackets, e.g., `<return>', `<down>', or
130 `<f1>', represents a function key. (Note that in the standard
131 configuration, the function key `<return>' and the control key
132 <RET> are synonymous.) You can use angle brackets on the
133 words <RET>, <SPC>, etc., but they are not required there.
135 * Keys can be written by their ASCII code, using a backslash
136 followed by up to six octal digits. This is the only way to
137 represent keys with codes above \377.
139 * One or more prefixes `M-' (meta), `C-' (control), `S-'
140 (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
141 precede a character or key notation. For function keys, the
142 prefixes may go inside or outside of the brackets: `C-<down>'
143 == `<C-down>'. The prefixes may be written in any order:
146 Prefixes are not allowed on multi-key words, e.g., `C-abc',
147 except that the Meta prefix is allowed on a sequence of
148 digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
150 * The `^' notation for control characters also works: `^M' ==
153 * Double angle brackets enclose command names: `<<next-line>>'
154 is shorthand for `M-x next-line <RET>'.
156 * Finally, `REM' or `;;' causes the rest of the line to be
157 ignored as a comment.
159 Any word may be prefixed by a multiplier in the form of a decimal
160 number and `*': `3*<right>' == `<right> <right> <right>', and
161 `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
163 Multiple text keys can normally be strung together to form a word,
164 but you may need to add whitespace if the word would look like one
165 of the above notations: `; ; ;' is a keyboard macro with three
166 semicolons, but `;;;' is a comment. Likewise, `\ 1 2 3' is four
167 keys but `\123' is a single key written in octal, and `< right >'
168 is seven keys but `<right>' is a single function key. When in
169 doubt, use whitespace.
172 File: xemacs-faq.info, Node: Q5.1.4, Next: Q5.1.5, Prev: Q5.1.3, Up: Miscellaneous
174 Q5.1.4: What is the performance hit of `let'?
175 ---------------------------------------------
177 In most cases, not noticeable. Besides, there's no avoiding
178 `let'--you have to bind your local variables, after all. Some pose a
179 question whether to nest `let's, or use one `let' per function. I
180 think because of clarity and maintenance (and possible future
181 implementation), `let'-s should be used (nested) in a way to provide
185 File: xemacs-faq.info, Node: Q5.1.5, Next: Q5.1.6, Prev: Q5.1.4, Up: Miscellaneous
187 Q5.1.5: What is the recommended use of `setq'?
188 ----------------------------------------------
192 You will typically `defvar' your global variable to a default
193 value, and use `setq' to set it later.
195 It is never a good practice to `setq' user variables (like
196 `case-fold-search', etc.), as it ignores the user's choice
197 unconditionally. Note that `defvar' doesn't change the value of a
198 variable if it was bound previously. If you wish to change a
199 user-variable temporarily, use `let':
201 (let ((case-fold-search nil))
202 ... ; code with searches that must be case-sensitive
205 You will notice the user-variables by their docstrings beginning
206 with an asterisk (a convention).
210 Bind them with `let', which will unbind them (or restore their
211 previous value, if they were bound) after exiting from the `let'
212 form. Change the value of local variables with `setq' or whatever
213 you like (e.g. `incf', `setf' and such). The `let' form can even
214 return one of its local variables.
218 ;; iterate through the elements of the list returned by
219 ;; `hairy-function-that-returns-list'
220 (let ((l (hairy-function-that-returns-list)))
222 ... do something with (car l) ...
225 Another typical usage includes building a value simply to work
228 ;; Build the mode keymap out of the key-translation-alist
229 (let ((inbox (file-truename (expand-file-name box)))
231 ... code dealing with inbox ...
234 This piece of code uses the local variable `inbox', which becomes
235 unbound (or regains old value) after exiting the form. The form
236 also returns the value of `inbox', which can be reused, for
239 (setq foo-processed-inbox
243 File: xemacs-faq.info, Node: Q5.1.6, Next: Q5.1.7, Prev: Q5.1.5, Up: Miscellaneous
245 Q5.1.6: What is the typical misuse of `setq' ?
246 ----------------------------------------------
248 A typical misuse is probably `setq'ing a variable that was meant to
249 be local. Such a variable will remain bound forever, never to be
250 garbage-collected. For example, the code doing:
252 (defun my-function (whatever)
254 ... build a large list ...
257 does a bad thing, as `a' will keep consuming memory, never to be
258 unbound. The correct thing is to do it like this:
260 (defun my-function (whatever)
261 (let (a) ; default initialization is to nil
262 ... build a large list ...
263 ... and exit, unbinding `a' in the process ...)
265 Not only is this prettier syntactically, but it makes it possible for
266 Emacs to garbage-collect the objects which `a' used to reference.
268 Note that even global variables should not be `setq'ed without
269 `defvar'ing them first, because the byte-compiler issues warnings. The
270 reason for the warning is the following:
272 (defun flurgoze nil) ; ok, global internal variable
275 (setq flurghoze t) ; ops! a typo, but semantically correct.
276 ; however, the byte-compiler warns.
278 While compiling toplevel forms:
279 ** assignment to free variable flurghoze
282 File: xemacs-faq.info, Node: Q5.1.7, Next: Q5.1.8, Prev: Q5.1.6, Up: Miscellaneous
284 Q5.1.7: I like the the `do' form of cl, does it slow things down?
285 -----------------------------------------------------------------
287 It shouldn't. Here is what Dave Gillespie has to say about cl.el
290 Many of the advanced features of this package, such as `defun*',
291 `loop', and `setf', are implemented as Lisp macros. In
292 byte-compiled code, these complex notations will be expanded into
293 equivalent Lisp code which is simple and efficient. For example,
299 are expanded at compile-time to the Lisp forms
302 (setcar p (cons x (car p)))
304 which are the most efficient ways of doing these respective
305 operations in Lisp. Thus, there is no performance penalty for
306 using the more readable `incf' and `push' forms in your compiled
309 *Interpreted* code, on the other hand, must expand these macros
310 every time they are executed. For this reason it is strongly
311 recommended that code making heavy use of macros be compiled. (The
312 features labelled "Special Form" instead of "Function" in this
313 manual are macros.) A loop using `incf' a hundred times will
314 execute considerably faster if compiled, and will also
315 garbage-collect less because the macro expansion will not have to
316 be generated, used, and thrown away a hundred times.
318 You can find out how a macro expands by using the `cl-prettyexpand'
322 File: xemacs-faq.info, Node: Q5.1.8, Next: Q5.1.9, Prev: Q5.1.7, Up: Miscellaneous
324 Q5.1.8: I like recursion, does it slow things down?
325 ---------------------------------------------------
327 Yes. Emacs byte-compiler cannot do much to optimize recursion. But
328 think well whether this is a real concern in Emacs. Much of the Emacs
329 slowness comes from internal mechanisms such as redisplay, or from the
330 fact that it is an interpreter.
332 Please try not to make your code much uglier to gain a very small
333 speed gain. It's not usually worth it.
336 File: xemacs-faq.info, Node: Q5.1.9, Next: Q5.1.10, Prev: Q5.1.8, Up: Miscellaneous
338 Q5.1.9: How do I put a glyph as annotation in a buffer?
339 -------------------------------------------------------
341 Here is a solution that will insert the glyph annotation at the
344 (make-annotation (make-glyph '([FORMAT :file FILE]
345 [string :data "fallback-text"]))
350 Replace `FORMAT' with an unquoted symbol representing the format of
351 the image (e.g. `xpm', `xbm', `gif', `jpeg', etc.) Instead of `FILE',
352 use the image file name (e.g.
353 `/usr/local/lib/xemacs-20.2/etc/recycle.xpm').
355 You can turn this to a function (that optionally prompts you for a
356 file name), and inserts the glyph at `(point)' instead of `(point-min)'.
359 File: xemacs-faq.info, Node: Q5.1.10, Next: Q5.1.11, Prev: Q5.1.9, Up: Miscellaneous
361 Q5.1.10: `map-extents' won't traverse all of my extents!
362 --------------------------------------------------------
364 I tried to use `map-extents' to do an operation on all the extents
365 in a region. However, it seems to quit after processing a random number
366 of extents. Is it buggy?
368 No. The documentation of `map-extents' states that it will iterate
369 across the extents as long as FUNCTION returns `nil'. Unexperienced
370 programmers often forget to return `nil' explicitly, which results in
371 buggy code. For instance, the following code is supposed to delete all
372 the extents in a buffer, and issue as many `fubar!' messages.
374 (map-extents (lambda (ext ignore)
378 Instead, it will delete only the first extent, and stop right there -
379 because `message' will return a non-nil value. The correct code is:
381 (map-extents (lambda (ext ignore)
387 File: xemacs-faq.info, Node: Q5.1.11, Next: Q5.2.1, Prev: Q5.1.10, Up: Miscellaneous
389 Q5.1.11: My elisp program is horribly slow. Is there
390 -----------------------------------------------------
392 an easy way to find out where it spends time?
394 zHrvoje Niksic <hniksic@srce.hr> writes:
395 Under XEmacs 20.4 and later you can use `M-x
396 profile-key-sequence', press a key (say <RET> in the Gnus Group
397 buffer), and get the results using `M-x profile-results'. It
398 should give you an idea of where the time is being spent.
401 File: xemacs-faq.info, Node: Q5.2.1, Next: Q5.2.2, Prev: Q5.1.11, Up: Miscellaneous
403 Q5.2.1: How do I turn off the sound?
404 ------------------------------------
406 Add the following line to your `.emacs':
409 (setq sound-alist nil)
411 That will make your XEmacs totally silent - even the default ding
412 sound (TTY beep on TTY-s) will be gone.
414 Starting with XEmacs-20.2 you can also change these with Customize.
415 Select from the `Options' menu
416 `Customize->Emacs->Environment->Sound->Sound...' or type `M-x customize
420 File: xemacs-faq.info, Node: Q5.2.2, Next: Q5.2.3, Prev: Q5.2.1, Up: Miscellaneous
422 Q5.2.2: How do I get funky sounds instead of a boring beep?
423 -----------------------------------------------------------
425 Make sure your XEmacs was compiled with sound support, and then put
426 this in your `.emacs':
428 (load-default-sounds)
430 The sound support in XEmacs 19.14 was greatly improved over previous
434 File: xemacs-faq.info, Node: Q5.2.3, Next: Q5.2.4, Prev: Q5.2.2, Up: Miscellaneous
436 Q5.2.3: What's NAS, how do I get it?
437 ------------------------------------
439 *Note Q2.0.3::, for an explanation of the "Network Audio System".
442 File: xemacs-faq.info, Node: Q5.2.4, Next: Q5.3.1, Prev: Q5.2.3, Up: Miscellaneous
444 Q5.2.4: Sunsite sounds don't play.
445 ----------------------------------
447 I'm having some trouble with sounds I've downloaded from sunsite.
448 They play when I run them through `showaudio' or cat them directly to
449 `/dev/audio', but XEmacs refuses to play them.
451 Markus Gutschke <gutschk@uni-muenster.de> writes:
453 [Many of] These files have an (erroneous) 24byte header that tells
454 about the format that they have been recorded in. If you cat them
455 to `/dev/audio', the header will be ignored and the default
456 behavior for /dev/audio will be used. This happens to be 8kHz
457 uLaw. It is probably possible to fix the header by piping through
458 `sox' and passing explicit parameters for specifying the sampling
459 format; you then need to perform a 'null' conversion from SunAudio
463 File: xemacs-faq.info, Node: Q5.3.1, Next: Q5.3.2, Prev: Q5.2.4, Up: Miscellaneous
468 Q5.3.1: How do you make XEmacs indent CL if-clauses correctly?
469 --------------------------------------------------------------
471 I'd like XEmacs to indent all the clauses of a Common Lisp `if' the
472 same amount instead of indenting the 3rd clause differently from the
475 One way is to add, to `.emacs':
477 (put 'if 'lisp-indent-function nil)
479 However, note that the package `cl-indent' that comes with XEmacs
480 sets up this kind of indentation by default. `cl-indent' also knows
481 about many other CL-specific forms. To use `cl-indent', one can do
485 (setq lisp-indent-function (function common-lisp-indent-function))
487 One can also customize `cl-indent.el' so it mimics the default `if'
488 indentation `then' indented more than the `else'. Here's how:
490 (put 'if 'common-lisp-indent-function '(nil nil &body))
492 Also, a new version (1.2) of `cl-indent.el' was posted to
493 comp.emacs.xemacs on 12/9/94. This version includes more documentation
494 than previous versions. This may prove useful if you need to customize
495 any indent-functions.
498 File: xemacs-faq.info, Node: Q5.3.2, Next: Q5.3.3, Prev: Q5.3.1, Up: Miscellaneous
500 Q5.3.2: Fontifying hang when editing a postscript file.
501 -------------------------------------------------------
503 When I try to edit a postscript file it gets stuck saying:
504 `fontifying 'filename' (regexps....)' and it just sits there. If I
505 press `C-c' in the window where XEmacs was started, it suddenly becomes
508 This was caused by a bug in the Postscript font-lock regular
509 expressions. It was fixed in 19.13. For earlier versions of XEmacs,
510 have a look at your `.emacs' file. You will probably have a line like:
512 (add-hook 'postscript-mode-hook 'turn-on-font-lock)
514 Take it out, restart XEmacs, and it won't try to fontify your
515 postscript files anymore.
518 File: xemacs-faq.info, Node: Q5.3.3, Next: Q5.3.4, Prev: Q5.3.2, Up: Miscellaneous
520 Q5.3.3: How can I print WYSIWYG a font-locked buffer?
521 -----------------------------------------------------
523 Font-lock looks nice. How can I print (WYSIWYG) the highlighted
526 The package `ps-print', which is now included with XEmacs, provides
527 the ability to do this. The source code contains complete instructions
528 on its use, in `<xemacs_src_root>/lisp/packages/ps-print.el'.
531 File: xemacs-faq.info, Node: Q5.3.4, Next: Q5.3.5, Prev: Q5.3.3, Up: Miscellaneous
533 Q5.3.4: Getting `M-x lpr' to work with postscript printer.
534 ----------------------------------------------------------
536 My printer is a Postscript printer and `lpr' only works for
537 Postscript files, so how do I get `M-x lpr-region' and `M-x lpr-buffer'
540 Put something like this in your `.emacs':
542 (setq lpr-command "a2ps")
543 (setq lpr-switches '("-p" "-1"))
545 If you don't use a2ps to convert ASCII to postscript (why not, it's
546 free?), replace with the command you do use. Note also that some
547 versions of a2ps require a `-Pprinter' to ensure spooling.
550 File: xemacs-faq.info, Node: Q5.3.5, Next: Q5.3.6, Prev: Q5.3.4, Up: Miscellaneous
552 Q5.3.5: How do I specify the paths that XEmacs uses for finding files?
553 ----------------------------------------------------------------------
555 You can specify what paths to use by using a number of different
556 flags when running configure. See the section MAKE VARIABLES in the
557 top-level file INSTALL in the XEmacs distribution for a listing of
560 Most of the time, however, the simplest fix is: *do not* specify
561 paths as you might for GNU Emacs. XEmacs can generally determine the
562 necessary paths dynamically at run time. The only path that generally
563 needs to be specified is the root directory to install into. That can
564 be specified by passing the `--prefix' flag to configure. For a
565 description of the XEmacs install tree, please consult the `NEWS' file.
568 File: xemacs-faq.info, Node: Q5.3.6, Next: Q5.3.7, Prev: Q5.3.5, Up: Miscellaneous
570 Q5.3.6: [This question intentionally left blank]
571 ------------------------------------------------
573 Obsolete question, left blank to avoid renumbering.
576 File: xemacs-faq.info, Node: Q5.3.7, Next: Q5.3.8, Prev: Q5.3.6, Up: Miscellaneous
578 Q5.3.7: Can I have the end of the buffer delimited in some way?
579 ---------------------------------------------------------------
585 (let ((ext (make-extent (point-min) (point-max))))
586 (set-extent-property ext 'start-closed t)
587 (set-extent-property ext 'end-closed t)
588 (set-extent-property ext 'detachable nil)
589 (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
591 Since this is XEmacs, you can specify an icon to be shown on
592 window-system devices. To do so, change the `make-glyph' call to
595 (make-glyph '([xpm :file "~/something.xpm"]
596 [string :data "[END]"]))
598 You can inline the XPM definition yourself by specifying `:data'
599 instead of `:file'. Here is such a full-featured version that works on
600 both X and TTY devices:
602 (let ((ext (make-extent (point-min) (point-max))))
603 (set-extent-property ext 'start-closed t)
604 (set-extent-property ext 'end-closed t)
605 (set-extent-property ext 'detachable nil)
606 (set-extent-end-glyph ext (make-glyph '([xpm :data "\
617 \"___________`_`_`___b_b_b_b_________`____\",
618 \"_________`_`_`___b_c_c_c_b_b____________\",
619 \"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
620 \"___`_`_e_a___b_b_d___b___b___b___b______\",
621 \"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
622 \"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
623 \"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
624 \"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
625 \"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
626 \"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
627 \"___`_____`_`_`_`___b_b_b_b_b_b__________\",
629 [string :data "[END]"]))))
631 Note that you might want to make this a function, and put it to a
632 hook. We leave that as an exercise for the reader.
635 File: xemacs-faq.info, Node: Q5.3.8, Next: Q5.3.9, Prev: Q5.3.7, Up: Miscellaneous
637 Q5.3.8: How do I insert today's date into a buffer?
638 ---------------------------------------------------
642 (insert (current-time-string))
645 File: xemacs-faq.info, Node: Q5.3.9, Next: Q5.3.10, Prev: Q5.3.8, Up: Miscellaneous
647 Q5.3.9: Are only certain syntactic character classes available for abbrevs?
648 ---------------------------------------------------------------------------
650 Markus Gutschke <gutschk@uni-muenster.de> writes:
652 Yes, abbrevs only expands word-syntax strings. While XEmacs does
653 not prevent you from defining (e.g. with `C-x a g' or `C-x a l')
654 abbrevs that contain special characters, it will refuse to expand
655 them. So you need to ensure, that the abbreviation contains
656 letters and digits only. This means that `xd', `d5', and `5d' are
657 valid abbrevs, but `&d', and `x d' are not.
659 If this sounds confusing to you, (re-)read the online
660 documentation for abbrevs (`C-h i m XEmacs <RET> m Abbrevs
661 <RET>'), and then come back and read this question/answer again.
663 Starting with XEmacs 20.3 this restriction has been lifted.
666 File: xemacs-faq.info, Node: Q5.3.10, Next: Q5.3.11, Prev: Q5.3.9, Up: Miscellaneous
668 Q5.3.10: How can I get those oh-so-neat X-Face lines?
669 -----------------------------------------------------
671 Firstly there is an ftp site which describes X-faces and has the
672 associated tools mentioned below, at
673 `ftp://ftp.cs.indiana.edu:/pub/faces/'.
677 1. Create 48x48x1 bitmap with your favorite tool
679 2. Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
680 and then compile the face.
682 3. cat file.xbm | xbm2ikon |compface > file.face
684 4. Then be sure to quote things that are necessary for emacs strings:
686 cat ./file.face | sed 's/\\/\\\\/g'
687 | sed 's/\"/\\\"/g' > ./file.face.quoted
689 5. Then set up emacs to include the file as a mail header - there
690 were a couple of suggestions here--either something like:
692 (setq mail-default-headers
693 "X-Face: <Ugly looking text string here>")
695 Or, alternatively, as:
697 (defun mail-insert-x-face ()
699 (goto-char (point-min))
700 (search-forward mail-header-separator)
703 (insert-file-contents "~/.face")))
705 (add-hook 'mail-setup-hook 'mail-insert-x-face)
707 However, 2 things might be wrong:
709 Some versions of pbmtoicon produces some header lines that is not
710 expected by the version of compface that I grabbed. So I found I had to
711 include a `tail +3' in the pipeline like this:
713 cat file.xbm | xbm2ikon | tail +3 |compface > file.face
715 Some people have also found that if one uses the `(insert-file)'
716 method, one should NOT quote the face string using the sed script .
718 It might also be helpful to use Stig's <stig@hackvan.com> script
719 (included in the compface distribution at XEmacs.org) to do the
720 conversion. For convenience xbm2xface is available for anonymous FTP at
721 `ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl'.
723 Contributors for this item:
725 Paul Emsley, Ricardo Marek, Amir J. Katz, Glen McCort, Heinz Uphoff,
726 Peter Arius, Paul Harrison, and Vegard Vesterheim
729 File: xemacs-faq.info, Node: Q5.3.11, Next: Q5.3.12, Prev: Q5.3.10, Up: Miscellaneous
731 Q5.3.11: How do I add new Info directories?
732 -------------------------------------------
734 You use something like:
736 (setq Info-directory-list (cons
737 (expand-file-name "~/info")
738 Info-default-directory-list))
740 David Masterson <davidm@prism.kla.com> writes:
742 Emacs Info and XEmacs Info do many things differently. If you're
743 trying to support a number of versions of Emacs, here are some
746 1. Emacs Info scans `Info-directory-list' from right-to-left
747 while XEmacs Info reads it from left-to-right, so append to
748 the *correct* end of the list.
750 2. Use `Info-default-directory-list' to initialize
751 `Info-directory-list' *if* it is available at startup, but not
752 all Emacsen define it.
754 3. Emacs Info looks for a standard `dir' file in each of the
755 directories scanned from #1 and magically concatenates them
758 4. XEmacs Info looks for a `localdir' file (which consists of
759 just the menu entries from a `dir' file) in each of the
760 directories scanned from #1 (except the first), does a simple
761 concatenation of them, and magically attaches the resulting
762 list to the end of the menu in the `dir' file in the first
765 Another alternative is to convert the documentation to HTML with
766 texi2html and read it from a web browser like Lynx or W3.
769 File: xemacs-faq.info, Node: Q5.3.12, Prev: Q5.3.11, Up: Miscellaneous
771 Q5.3.12: What do I need to change to make printing work?
772 --------------------------------------------------------
774 For regular printing there are two variables that can be customized.
777 This should be set to a command that takes standard input and sends
778 it to a printer. Something like:
780 (setq lpr-command "lp")
783 This should be set to a list that contains whatever the print
784 command requires to do its job. Something like:
786 (setq lpr-switches '("-depson"))
788 For postscript printing there are three analogous variables to
792 This should be set to a command that takes postscript on standard
793 input and directs it to a postscript printer.
796 This should be set to a list of switches required for
797 `ps-lpr-command' to do its job.
800 This boolean variable should be set `t' if printing will be done in
801 color, otherwise it should be set to `nil'.
803 NOTE: It is an undocumented limitation in XEmacs that postscript
804 printing (the `Pretty Print Buffer' menu item) *requires* a window
805 system environment. It cannot be used outside of X11.
808 File: xemacs-faq.info, Node: Current Events, Prev: Miscellaneous, Up: Top
810 6 What the Future Holds
811 ***********************
813 This is part 6 of the XEmacs Frequently Asked Questions list. This
814 section will change monthly, and contains any interesting items that
815 have transpired over the previous month. If you are reading this from
816 the XEmacs distribution, please see the version on the Web or archived
817 at the various FAQ FTP sites, as this file is surely out of date.
821 * Q6.0.1:: What is new in 20.2?
822 * Q6.0.2:: What is new in 20.3?
823 * Q6.0.3:: What is new in 20.4?
824 * Q6.0.4:: Procedural changes in XEmacs development.
827 File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: Current Events, Up: Current Events
832 Q6.0.1: What is new in 20.2?
833 ----------------------------
835 The biggest changes in 20.2 include integration of EFS (the next
836 generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a
837 major mode for editing Tex and LaTeX, and a lot of other stuff). Many
838 bugs from 20.0 have been fixed for this release. 20.2 also contains a
839 new system for customizing XEmacs options, invoked via `M-x customize'.
841 XEmacs 20.2 is the development release (20.0 was beta), and is no
842 longer considered unstable.
845 File: xemacs-faq.info, Node: Q6.0.2, Next: Q6.0.3, Prev: Q6.0.1, Up: Current Events
847 Q6.0.2: What is new in 20.3?
848 ----------------------------
850 XEmacs 20.3 was released in November 1997. It contains many bugfixes,
851 and a number of new features, including Autoconf 2 based configuration,
852 additional support for Mule (Multi-language extensions to Emacs), many
853 more customizations, multiple frames on TTY-s, support for multiple info
854 directories, an enhanced gnuclient, improvements to regexp matching,
855 increased MIME support, and many, many synches with GNU Emacs 20.
857 The XEmacs/Mule support has been only seriously tested in a Japanese
858 locale, and no doubt many problems still remain. The support for
859 ISO-Latin-1 and Japanese is fairly strong. MULE support comes at a
860 price - about a 30% slowdown from 19.16. We're making progress on
861 improving performance and XEmacs 20.3 compiled without Mule (which is
862 the default) is definitely faster than XEmacs 19.16.
864 XEmacs 20.3 is the first non-beta v20 release, and will be the basis
865 for all further development.
868 File: xemacs-faq.info, Node: Q6.0.3, Next: Q6.0.4, Prev: Q6.0.2, Up: Current Events
870 Q6.0.3: What's new in XEmacs 20.4?
871 ----------------------------------
873 XEmacs 20.4 is a bugfix release with no user-visible changes.
876 File: xemacs-faq.info, Node: Q6.0.4, Prev: Q6.0.3, Up: Current Events
878 Q6.0.4: Procedural changes in XEmacs development.
879 -------------------------------------------------
881 1. Discussion about the development of XEmacs occurs on the
882 xemacs-beta mailing list. Subscriptions to this list will now be
883 fully automated instead of being handled by hand. Send a mail
884 message to <xemacs-beta-request@xemacs.org> with `subscribe' as the
885 BODY of the message to join the list. Please note this is a
886 developers mailing list for people who have an active interest in
887 the development process.
889 The discussion of NT XEmacs development is taking place on a
890 separate mailing list. Send mail to
891 <xemacs-nt-request@xemacs.org> to subscribe.
893 2. Due to the long development cycle in between releases, it has been
894 decided that intermediate versions will be made available in
895 source only form for the truly interested.
897 XEmacs 19.16 was the last 19 release, basically consisting of
898 19.15 plus the collected bugfixes.
900 3. As of December 1996, Steve Baur <steve@altair.xemacs.org> has
901 become the lead maintainer of XEmacs.