Sync with r21-2-28.
[chise/xemacs-chise.git] / info / xemacs-faq.info-4
1 This is ../info/xemacs-faq.info, produced by makeinfo version 4.0 from
2 xemacs-faq.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * FAQ: (xemacs-faq).            XEmacs FAQ.
7 END-INFO-DIR-ENTRY
8
9 \1f
10 File: xemacs-faq.info,  Node: Q4.0.2,  Next: Q4.0.3,  Prev: Q4.0.1,  Up: Subsystems
11
12 Q4.0.2: How do I get VM to filter mail for me?
13 ----------------------------------------------
14
15    One possibility is to use procmail to split your mail before it gets
16 to VM.  I prefer this personally, since there are many strange and
17 wonderful things one can do with procmail.  Procmail may be found at
18 `ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
19
20    Also see the Mail Filtering FAQ at:
21 `ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
22
23 \1f
24 File: xemacs-faq.info,  Node: Q4.0.3,  Next: Q4.0.4,  Prev: Q4.0.2,  Up: Subsystems
25
26 Q4.0.3: How can I get VM to automatically check for new mail?
27 -------------------------------------------------------------
28
29    John Turner <turner@lanl.gov> writes:
30
31      Use the following:
32
33           (setq vm-auto-get-new-mail 60)
34
35 \1f
36 File: xemacs-faq.info,  Node: Q4.0.4,  Next: Q4.0.5,  Prev: Q4.0.3,  Up: Subsystems
37
38 Q4.0.4: [This question intentionally left blank]
39 ------------------------------------------------
40
41    Obsolete question, left blank to avoid renumbering.
42
43 \1f
44 File: xemacs-faq.info,  Node: Q4.0.5,  Next: Q4.0.6,  Prev: Q4.0.4,  Up: Subsystems
45
46 Q4.0.5: How do I get my outgoing mail archived?
47 -----------------------------------------------
48
49      (setq mail-archive-file-name "~/outbox")
50
51 \1f
52 File: xemacs-faq.info,  Node: Q4.0.6,  Next: Q4.0.7,  Prev: Q4.0.5,  Up: Subsystems
53
54 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"?
55 ---------------------------------------------------------------------------------------------------------------------
56
57    Set `vm-reply-ignored-addresses' to a list, like
58
59      (setq vm-reply-ignored-addresses
60            '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
61              "wing@netcom.com" "wing@xemacs.org"))
62
63    Note that each string is a regular expression.
64
65 \1f
66 File: xemacs-faq.info,  Node: Q4.0.7,  Next: Q4.0.8,  Prev: Q4.0.6,  Up: Subsystems
67
68 Q4.0.7: Is there a mailing list or FAQ for VM?
69 ----------------------------------------------
70
71    A FAQ for VM exists at `http://www.cyberpass.net/~gorkab/vmfaq.htm'.
72
73    VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
74
75 \1f
76 File: xemacs-faq.info,  Node: Q4.0.8,  Next: Q4.0.9,  Prev: Q4.0.7,  Up: Subsystems
77
78 Q4.0.8: Remote mail reading with VM.
79 ------------------------------------
80
81    My mailbox lives at the office on a big honkin server.  My regular
82 INBOX lives on my honkin desktop machine.  I now can PPP to the office
83 from home which is far from honking...  I'd like to be able to read
84 mail at home without storing it here and I'd like to use xemacs and VM
85 at home...  Is there a recommended setup?
86
87    Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
88
89      There are several ways to do this.
90
91        1. Set your display to your home machine and run dxpc or one of
92           the other X compressors.
93
94        2. NFS mount your desktop machine on your home machine and
95           modify your pop command on your home machine to rsh to your
96           desktop machine and actually do the pop get's.
97
98        3. Run a POP server on your desktop machine as well and do a
99           sort of two tiered POP get.
100
101    William Perry <wmperry@monolith.spry.com> adds:
102
103      Or you could run a pop script periodically on your desktop
104      machine, and just use ange-ftp or NFS to get to your mailbox.  I
105      used to do this all the time back at IU.
106
107 \1f
108 File: xemacs-faq.info,  Node: Q4.0.9,  Next: Q4.0.10,  Prev: Q4.0.8,  Up: Subsystems
109
110 Q4.0.9: rmail or VM gets an error incorporating new mail.
111 ---------------------------------------------------------
112
113    Quoting the XEmacs PROBLEMS file:
114
115      rmail and VM get new mail from `/usr/spool/mail/$USER' using a
116      program called `movemail'.  This program interlocks with
117      `/bin/mail' using the protocol defined by `/bin/mail'.
118
119      There are two different protocols in general use.  One of them
120      uses the `flock' system call.  The other involves creating a lock
121      file; `movemail' must be able to write in `/usr/spool/mail' in
122      order to do this.  You control which one is used by defining, or
123      not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
124      or s- file it includes.
125
126      *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
127      SYSTEM, YOU CAN LOSE MAIL!*
128
129      If your system uses the lock file protocol, and fascist
130      restrictions prevent ordinary users from writing the lock files in
131      `/usr/spool/mail', you may need to make `movemail' setgid to a
132      suitable group such as `mail'.  You can use these commands (as
133      root):
134
135           chgrp mail movemail
136           chmod 2755 movemail
137
138      If your system uses the lock file protocol, and fascist
139      restrictions prevent ordinary users from writing the lock files in
140      `/usr/spool/mail', you may need to make `movemail' setgid to a
141      suitable group such as `mail'.  To do this, use the following
142      commands (as root) after doing the make install.
143
144           chgrp mail movemail
145           chmod 2755 movemail
146
147      Installation normally copies movemail from the build directory to
148      an installation directory which is usually under `/usr/local/lib'.
149      The installed copy of `movemail' is usually in the directory
150      `/usr/local/lib/emacs/VERSION/TARGET'.  You must change the group
151      and mode of the installed copy; changing the group and mode of the
152      build directory copy is ineffective.
153
154 \1f
155 File: xemacs-faq.info,  Node: Q4.0.10,  Next: Q4.0.11,  Prev: Q4.0.9,  Up: Subsystems
156
157 Q4.0.10: How do I make VM stay in a single frame?
158 -------------------------------------------------
159
160    John.John S Cooper <Cooper@Eng.Sun.COM> writes:
161
162                                                   ; Don't use multiple frames
163           (setq vm-frame-per-composition nil)
164           (setq vm-frame-per-folder nil)
165           (setq vm-frame-per-edit nil)
166           (setq vm-frame-per-summary nil)
167
168 \1f
169 File: xemacs-faq.info,  Node: Q4.0.11,  Next: Q4.0.12,  Prev: Q4.0.10,  Up: Subsystems
170
171 Q4.0.11: How do I make VM or mh-e display graphical smilies?
172 ------------------------------------------------------------
173
174    For mh-e use the following:
175
176      (add-hook 'mh-show-mode-hook '(lambda ()
177                                      (smiley-region (point-min)
178                                                     (point-max))))
179
180    WJCarpenter <bill@carpenter.ORG> writes: For VM use the following:
181             (autoload 'smiley-region "smiley" nil t)
182             (add-hook 'vm-select-message-hook
183                       '(lambda ()
184                          (smiley-region (point-min)
185                                         (point-max))))
186
187    For tm use the following:
188      (autoload 'smiley-buffer "smiley" nil t)
189      (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
190
191 \1f
192 File: xemacs-faq.info,  Node: Q4.0.12,  Next: Q4.1.1,  Prev: Q4.0.11,  Up: Subsystems
193
194 Q4.0.12: Customization of VM not covered in the manual, or here.
195 ----------------------------------------------------------------
196
197    giacomo boffi <boffi@hp735.stru.polimi.it> writes:
198
199      The meta-answer is to look into the file `vm-vars.el', in the vm
200      directory of the lisp library.
201
202      `vm-vars.el' contains, initializes and carefully describes, with
203      examples of usage, the plethora of user options that _fully_
204      control VM's behavior.
205
206      Enter vm-vars, `forward-search' for toolbar, find the variables
207      that control the toolbar placement, appearance, existence, copy to
208      your `.emacs' or `.vm' and modify according to the detailed
209      instructions.
210
211      The above also applies to all the various features of VM: search
212      for some keywords, maybe the first you conjure isn't appropriate,
213      find the appropriate variables, copy and experiment.
214
215 \1f
216 File: xemacs-faq.info,  Node: Q4.1.1,  Next: Q4.1.2,  Prev: Q4.0.12,  Up: Subsystems
217
218 4.1: Web browsing with W3
219 =========================
220
221 Q4.1.1: What is W3?
222 -------------------
223
224    W3 is an advanced graphical browser written in Emacs lisp that runs
225 on XEmacs.  It has full support for cascaded style sheets, and more...
226
227    It has a home web page at
228 `http://www.cs.indiana.edu/elisp/w3/docs.html'.
229
230 \1f
231 File: xemacs-faq.info,  Node: Q4.1.2,  Next: Q4.1.3,  Prev: Q4.1.1,  Up: Subsystems
232
233 Q4.1.2: How do I run W3 from behind a firewall?
234 -----------------------------------------------
235
236    There is a long, well-written, detailed section in the W3 manual that
237 describes how to do this.  Look in the section entitled "Firewalls".
238
239 \1f
240 File: xemacs-faq.info,  Node: Q4.1.3,  Next: Q4.2.1,  Prev: Q4.1.2,  Up: Subsystems
241
242 Q4.1.3: Is it true that W3 supports style sheets and tables?
243 ------------------------------------------------------------
244
245    Yes, and much more.  W3, as distributed with the latest XEmacs is a
246 full-featured web browser.
247
248 \1f
249 File: xemacs-faq.info,  Node: Q4.2.1,  Next: Q4.2.2,  Prev: Q4.1.3,  Up: Subsystems
250
251 4.2: Reading Netnews and Mail with Gnus
252 =======================================
253
254 Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
255 --------------------------------------------------------------------------------
256
257    The Gnus numbering issues are not meant for mere mortals to know
258 them.  If you feel you _must_ enter the muddy waters of Gnus, visit the
259 excellent FAQ, maintained by Justin Sheehy, at:
260
261      `http://www.ccs.neu.edu/software/contrib/gnus/'
262
263    See also Gnus home page
264      `http://www.gnus.org/'
265
266 \1f
267 File: xemacs-faq.info,  Node: Q4.2.2,  Next: Q4.2.3,  Prev: Q4.2.1,  Up: Subsystems
268
269 Q4.2.2: This question intentionally left blank.
270 -----------------------------------------------
271
272    Obsolete question, left blank to avoid renumbering.
273
274 \1f
275 File: xemacs-faq.info,  Node: Q4.2.3,  Next: Q4.2.4,  Prev: Q4.2.2,  Up: Subsystems
276
277 Q4.2.3: How do I make Gnus stay within a single frame?
278 ------------------------------------------------------
279
280    The toolbar code to start Gnus opens the new frame--and it's a
281 feature rather than a bug.  If you don't like it, but would still like
282 to click on the seemly icon, use the following code:
283
284      (defun toolbar-news ()
285        (gnus))
286
287    It will redefine the callback function of the icon to just call
288 `gnus', without all the fancy frame stuff.
289
290 \1f
291 File: xemacs-faq.info,  Node: Q4.2.4,  Next: Q4.3.1,  Prev: Q4.2.3,  Up: Subsystems
292
293 Q4.2.4: How do I customize the From: line?
294 ------------------------------------------
295
296    How do I change the `From:' line?  I have set gnus-user-from-line to
297      Gail Gurman <gail.gurman@sybase.com>
298     , but XEmacs Gnus doesn't use it. Instead it uses
299      Gail Mara Gurman <gailg@deall>
300  and then complains that it's incorrect. Also, as you perhaps can see,
301 my Message-ID is screwy. How can I change that?
302
303 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
304
305      Set `user-mail-address' to `gail.gurman@sybase.com' or
306      `mail-host-address' to `sybase.com'.
307
308 \1f
309 File: xemacs-faq.info,  Node: Q4.3.1,  Next: Q4.3.2,  Prev: Q4.2.4,  Up: Subsystems
310
311 4.3: Other Mail & News
312 ======================
313
314 Q4.3.1: How can I read and/or compose MIME messages?
315 ----------------------------------------------------
316
317    VM supports MIME natively.
318
319    You probably want to use the Tools for MIME (tm).  *Note Q4.3.2::,
320 for details.
321
322    Trey Jackson <trey@cs.berkeley.edu> has an Emacs & MIME web page at
323 `http://bmrc.berkeley.edu/~trey/emacs/mime.html'.
324
325    Another possibility is RMIME.  You may find RMIME at
326 `http://www.cinti.net/~rmoody/rmime/index.html'.
327
328 \1f
329 File: xemacs-faq.info,  Node: Q4.3.2,  Next: Q4.3.3,  Prev: Q4.3.1,  Up: Subsystems
330
331 Q4.3.2: What is TM and where do I get it?
332 -----------------------------------------
333
334    TM stands for "Tools for MIME" and not Tiny MIME.  TM integrates
335 with all major XEmacs packages like Gnus (all flavors), VM, MH-E, and
336 mailcrypt.  It provides totally transparent and trouble-free MIME
337 support.  When appropriate a message will be decoded in place in an
338 XEmacs buffer.
339
340    TM now comes as a package with XEmacs 19.16 and XEmacs 20.2.
341
342    TM was written by MORIOKA Tomohiko <morioka@jaist.ac.jp> and
343 KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>.
344
345    It is based on the work of UMEDA Masanobu
346 <umerin@mse.kyutech.ac.jp>, the original writer of GNUS.
347
348    The following information is from the `README':
349
350    "tm" is a MIME package for GNU Emacs.  tm has following functions:
351
352    * MIME style multilingual header.
353
354    * MIME message viewer (mime/viewer-mode).
355
356    * MIME message composer (mime/editor-mode).
357
358    * MIME extenders for mh-e, GNUS, RMAIL and VM.
359
360    tm is available from following anonymous ftp sites:
361    * `ftp://ftp.unicamp.br/pub/mail/mime/tm/' (Brasil).
362
363    * `ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/'
364      (Germany).
365
366    * `ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/'
367      (Germany).
368
369    Don't let the installation procedure & instructions stop you from
370 trying this package out--it's much simpler than it looks, and once
371 installed, trivial to use.
372
373 \1f
374 File: xemacs-faq.info,  Node: Q4.3.3,  Next: Q4.3.4,  Prev: Q4.3.2,  Up: Subsystems
375
376 Q4.3.3: Why isn't this `movemail' program working?
377 --------------------------------------------------
378
379    Ben Wing <ben@xemacs.org> writes:
380
381      It wasn't chown'ed/chmod'd correctly.
382
383 \1f
384 File: xemacs-faq.info,  Node: Q4.3.4,  Next: Q4.3.5,  Prev: Q4.3.3,  Up: Subsystems
385
386 Q4.3.4: Movemail is also distributed by Netscape?  Can that cause problems?
387 ---------------------------------------------------------------------------
388
389    Steve Baur <steve@xemacs.org> writes:
390
391      Yes.  Always use the movemail installed with your XEmacs.  Failure
392      to do so can result in lost mail.
393
394    Please refer to Jamie Zawinski's <jwz@jwz.org> notes at
395 `http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html'.
396 In particular, this document will show you how to make Netscape use the
397 version of movemail configured for your system by the person who built
398 XEmacs.
399
400 \1f
401 File: xemacs-faq.info,  Node: Q4.3.5,  Next: Q4.4.1,  Prev: Q4.3.4,  Up: Subsystems
402
403 Q4.3.5: Where do I find pstogif (required by tm)?
404 -------------------------------------------------
405
406    pstogif is part of the latex2html package.
407
408    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
409
410    latex2html is best found at the CTAN hosts and their mirrors in
411 `tex-archive/support/latex2html'.
412
413    CTAN hosts are:
414
415    * `ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/'.
416
417    * `ftp://ftp.dante.de/tex-archive/support/latex2html/'.
418
419    There is a good mirror at ftp.cdrom.com;
420 `ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/'.
421
422 \1f
423 File: xemacs-faq.info,  Node: Q4.4.1,  Next: Q4.4.2,  Prev: Q4.3.5,  Up: Subsystems
424
425 4.4: Sparcworks, EOS, and WorkShop
426 ==================================
427
428 Q4.4.1: What is SPARCworks, EOS, and WorkShop?
429 ----------------------------------------------
430
431    John Turner <turner@lanl.gov> writes:
432
433      SPARCworks is SunSoft's development environment, comprising
434      compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a
435      debugger, and other tools such as TeamWare (for configuration
436      management), MakeTool, etc.
437
438    See `http://www.sun.com/software/Developer-products/' for more info.
439
440    EOS stands for "Era on SPARCworks", but I don't know what Era stands
441 for.
442
443    EOS is the integration of XEmacs with the SPARCworks debugger.  It
444 allows one to use an XEmacs frame to view code (complete with
445 fontification, etc.), set breakpoints, print variables, etc., while
446 using the SPARCworks debugger.  It works very well and I use it all the
447 time.
448
449    Chuck Thompson <cthomp@xemacs.org> writes:
450
451      Era stood for "Emacs Rewritten Again".  It was what we were
452      calling the modified version of Lucid Emacs for Sun when I was
453      dragged, er, allowed to work on this wonderful editor.
454
455    Martin Buchholz <martin@xemacs.org> writes:
456
457      EOS is being replaced with a new graphical development environment
458      called Sun WorkShop, which is currently (07/96) in Alpha Test.
459      For more details, check out
460      `http://www.sun.com/software/Products/Developer-products'.
461
462 \1f
463 File: xemacs-faq.info,  Node: Q4.4.2,  Next: Q4.5.1,  Prev: Q4.4.1,  Up: Subsystems
464
465 Q4.4.2: How do I start the Sun Workshop support in XEmacs 21?
466 -------------------------------------------------------------
467
468    Add the switch --with-workshop to the configure command when building
469 XEmacs and put the following in one of your startup files (e.g.
470 site-start.el or .emacs):
471
472      (when (featurep 'tooltalk)
473        (load "tooltalk-macros")
474        (load "tooltalk-util")
475        (load "tooltalk-init"))
476      (when (featurep 'sparcworks)
477        (load "sunpro-init")
478        (load "ring")
479        (load "comint")
480        (load "annotations")
481        (sunpro-startup))
482
483    If you are not using the latest Workshop (5.0) you have to apply the
484 following patch:
485
486 --- /opt/SUNWspro/lib/eserve.el.ORIG    Fri May 14 15:23:26 1999
487 +++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999
488 @@ -42,7 +42,7 @@
489  (defvar running-xemacs nil "t if we're running XEmacs")
490  (defvar running-emacs  nil "t if we're running GNU Emacs 19")
491
492 -(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version)
493 +(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version)
494      (setq running-xemacs t)
495      (setq running-emacs  t))
496
497 \1f
498 File: xemacs-faq.info,  Node: Q4.5.1,  Next: Q4.6.1,  Prev: Q4.4.2,  Up: Subsystems
499
500 4.5: Energize
501 =============
502
503 Q4.5.1: What is/was Energize?
504 -----------------------------
505
506    David N Gray <gray@meteor.harlequin.com> writes:
507      The files in `lisp/energize' are to enable Emacs to interface with
508      the "Energize Programming System", a C and C++ development
509      environment, which was a product of Lucid, Inc.  Tragically, Lucid
510      went out of business in 1994, so although Energize is still a
511      great system, if you don't already have it, there isn't any way to
512      get it now.  (Unless you happen to be in Japan; INS Engineering
513      may still be selling it there.  Tartan bought the rights to sell
514      it in the rest of the world, but never did so.)
515
516 \1f
517 File: xemacs-faq.info,  Node: Q4.6.1,  Next: Q4.7.1,  Prev: Q4.5.1,  Up: Subsystems
518
519 4.6: Infodock
520 =============
521
522 Q4.6.1: What is Infodock?
523 -------------------------
524
525    InfoDock is an integrated productivity toolset, mainly aimed at
526 technical people.  It is developed and supported by InfoDock
527 Associates, a firm that offers custom support and development for
528 InfoDock, XEmacs and GNU Emacs.  ( `http://www.infodock.com',
529 <info@infodock.com>, +1 408 243 3300).
530
531    InfoDock is built atop the XEmacs variant of GNU Emacs and so has
532 all of the power of Emacs, but with an easier to use and more
533 comprehensive menu-based user interface.  The bottom portion of this
534 text describes how it differs from XEmacs and GNU Emacs from the Free
535 Software Foundation.
536
537    InfoDock is aimed at people who want a free, turn-key productivity
538 environment.  Although InfoDock is customizable, it is not intended for
539 people who like basic versions of Emacs which need to be customized
540 extensively for local use; standard Emacs distributions are better for
541 such uses.  InfoDock is for those people who want a complete,
542 pre-customized environment in one package, which they need not touch
543 more than once or twice a year to update to new revisions.
544
545    InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
546 and Intel Linux systems.  It is intended for use on a color display,
547 although most features will work on monochrome monitors.  Simply unpack
548 InfoDock according to the instructions in the ID-INSTALL file and you
549 are ready to run.
550
551    The InfoDock Manual is concise, yet sufficient as a user guide for
552 users who have never used an Emacs-type editor before.  For users who
553 are already familiar with Emacs, it supplements the information in the
554 GNU Emacs Manual.
555
556    InfoDock menus are much more extensive and more mature than standard
557 Emacs menus.  Each menu offers a `Manual' item which displays
558 documentation associated with the menu's functions.
559
560 Four types of menubars are provided:
561   1. An extensive menubar providing access to global InfoDock commands.
562
563   2. Mode-specific menubars tailored to the current major mode.
564
565   3. A simple menubar for basic editing to help novices get started
566      with InfoDock.
567
568   4. The standard XEmacs menubar.
569
570    Most modes also include mode-specific popup menus.  Additionally,
571 region and rectangle popup menus are included.
572
573    `Hyperbole', the everyday information manager, is a core part of
574 InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
575 contact manager, programmable hypertext buttons, and an autonumbered
576 outliner with embedded hyperlink anchors.
577
578    The `OO-Browser', a multi-language object-oriented code browser, is a
579 standard part of InfoDock.
580
581    InfoDock saves a more extensive set of user options than other Emacs
582 versions.
583
584    InfoDock inserts a useful file header in many file types, showing the
585 author, summary, and last modification time of each file.  A summary
586 program can then be used to summarize all of the files in a directory,
587 for easy MANIFEST file creation.
588
589    Your working set of buffers is automatically saved and restored (if
590 you answer yes to a prompt) between InfoDock sessions.
591
592    Refined color choices for code highlighting are provided for both
593 dark and light background display frames.
594
595    The `C-z' key prefix performs frame-based commands which parallel the
596 `C-x' key prefix for window-based commands.
597
598    The Smart Menu system is included for producing command menus on dumb
599 terminals.
600
601    Lisp libraries are better categorized according to function.
602
603    Extensions and improvements to many areas of Emacs are included,
604 such as: paragraph filling, mail reading with Rmail, shell handling,
605 outlining, code highlighting and browsing, and man page browsing.
606
607    InfoDock questions, answers and discussion should go to the mail list
608 <infodock@infodock.com>.  Use <infodock-request@infodock.com> to be
609 added or removed from the list.  Always include your InfoDock version
610 number when sending help requests.
611
612    InfoDock is available across the Internet via anonymous FTP.  To get
613 it, first move to a directory into which you want the InfoDock archive
614 files placed.  We will call this <DIST-DIR>.
615
616         cd <DIST-DIR>
617
618    Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):
619
620         prompt> ftp ftp.xemacs.org
621
622    Login as `anonymous' with your own <user-id>@<site-name> as a
623 password.
624
625         Name (ftp.xemacs.org): anonymous
626         331 Guest login ok, send your complete e-mail address as password.
627         Password: -<your-user-id>@<your-domain>
628         230 Guest login ok, access restrictions apply.
629
630    Move to the location of the InfoDock archives:
631
632         ftp> cd pub/infodock
633
634    Set your transfer mode to binary:
635
636         ftp> bin
637         200 Type set to I.
638
639    Turn off prompting:
640
641         ftp> prompt
642         Interactive mode off.
643
644    Retrieve the InfoDock archives that you want, either by using a `get
645 <file>' for each file you want or by using the following to get a
646 complete distribution, including all binaries:
647
648         ftp> mget ID-INSTALL
649         ftp> mget id-*
650
651    Close the FTP connection:
652
653         ftp> quit
654         221 Goodbye.
655
656    Read the `ID-INSTALL' file which you just retrieved for step-by-step
657 installation instructions.
658
659 \1f
660 File: xemacs-faq.info,  Node: Q4.7.1,  Next: Q4.7.2,  Prev: Q4.6.1,  Up: Subsystems
661
662 4.7: Other Unbundled Packages
663 =============================
664
665 Q4.7.1: What is AUC TeX?  Where do you get it?
666 ----------------------------------------------
667
668    AUC TeX is a package written by Per Abrahamsen <abraham@dina.kvl.dk>.
669 Starting with XEmacs 19.16, AUC TeX is bundled with XEmacs.  The
670 following information is from the `README' and website.
671
672    AUC TeX is an extensible package that supports writing and formatting
673 TeX files for most variants of GNU Emacs. Many different macro packages
674 are supported, including AMS TeX, LaTeX, and TeXinfo.
675
676    The most recent version is always available by ftp at
677 `ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz'.
678
679    In case you don't have access to anonymous ftp, you can get it by an
680 email request to <ftpmail@decwrl.dec.com>.
681
682    WWW users may want to check out the AUC TeX page at
683 `http://sunsite.auc.dk/auctex/'.
684
685 \1f
686 File: xemacs-faq.info,  Node: Q4.7.2,  Next: Q4.7.3,  Prev: Q4.7.1,  Up: Subsystems
687
688 Q4.7.2: Are there any Emacs Lisp Spreadsheets?
689 ----------------------------------------------
690
691    Yes.  Check out "dismal" (which stands for Dis' Mode Ain't Lotus) at
692 `ftp://cs.nyu.edu/pub/local/fox/dismal/'.
693
694 \1f
695 File: xemacs-faq.info,  Node: Q4.7.3,  Next: Q4.7.4,  Prev: Q4.7.2,  Up: Subsystems
696
697 Q4.7.3: [This question intentionally left blank]
698 ------------------------------------------------
699
700 \1f
701 File: xemacs-faq.info,  Node: Q4.7.4,  Next: Q4.7.5,  Prev: Q4.7.3,  Up: Subsystems
702
703 Q4.7.4: Problems installing AUC TeX.
704 ------------------------------------
705
706    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
707
708      AUC TeX works fine on both stock Emacs and XEmacs has been doing
709      so for a very very long time. This is mostly due to the work of
710      Per Abrahamsen <abraham@dina.kvl.dk> (clap clap) in particular his
711      `easymenu' package.  Which leads to what is probably the problem...
712
713    Most problems with AUC TeX are one of two things:
714
715    * The TeX-lisp-directory in `tex-site.el' and the makefile don't
716      match.
717
718      Fix: make sure you configure AUC TeX properly *before* installing.
719
720    * You have an old version of easymenu.el in your path.
721
722      Fix: use `locate-library' and remove old versions to make sure it
723      *only* finds the one that came with XEmacs.
724
725 \1f
726 File: xemacs-faq.info,  Node: Q4.7.5,  Next: Q4.7.6,  Prev: Q4.7.4,  Up: Subsystems
727
728 Q4.7.5: Is there a reason for an Emacs package not to be included in XEmacs?
729 ----------------------------------------------------------------------------
730
731    The reason for an Emacs package not to be included in XEmacs is
732 usually one or more of the following:
733
734   1. The package has not been ported to XEmacs.  This will typically
735      happen when it uses GNU-Emacs-specific features, which make it
736      fail under XEmacs.
737
738      Porting a package to XEmacs can range from a trivial amount of
739      change to a partial or full rewrite.  Fortunately, the authors of
740      modern packages usually choose to support both Emacsen themselves.
741
742   2. The package has been decided not to be appropriate for XEmacs.  It
743      may have an equivalent or better replacement within XEmacs, in
744      which case the developers may choose not to burden themselves with
745      supporting an additional package.
746
747      Each package bundled with XEmacs means more work for the
748      maintainers, whether they want it or not.  If you are ready to
749      take over the maintenance responsibilities for the package you
750      port, be sure to say so--we will more likely include it.
751
752   3. The package simply hasn't been noted by the XEmacs development.  If
753      that's the case, the messages like yours are very useful for
754      attracting our attention.
755
756   4. The package was noted by the developers, but they simply haven't
757      yet gotten around to including/porting it.  Wait for the next
758      release or, even better, offer your help.  It will be gladly
759      accepted and appreciated.
760
761 \1f
762 File: xemacs-faq.info,  Node: Q4.7.6,  Prev: Q4.7.5,  Up: Subsystems
763
764 Q4.7.5: Is there a MatLab mode?
765 -------------------------------
766
767    Yes, a matlab mode and other items are available at the MathWorks'
768 emacs_add_ons ftp directory
769 (ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons).
770
771 \1f
772 File: xemacs-faq.info,  Node: Miscellaneous,  Next: MS Windows,  Prev: Subsystems,  Up: Top
773
774 5 The Miscellaneous Stuff
775 *************************
776
777    This is part 5 of the XEmacs Frequently Asked Questions list.  This
778 section is devoted to anything that doesn't fit neatly into the other
779 sections.
780
781 * Menu:
782
783 Major & Minor Modes:
784 * Q5.0.1::      How can I do source code highlighting using font-lock?
785 * Q5.0.2::      I do not like cc-mode.  How do I use the old c-mode?
786 * Q5.0.3::      How do I get `More' Syntax Highlighting on by default?
787 * Q5.0.4::      How can I enable auto-indent?
788 * Q5.0.5::      How can I get XEmacs to come up in text/auto-fill mode by default?
789 * Q5.0.6::      How do I start up a second shell buffer?
790 * Q5.0.7::      Telnet from shell filters too much.
791 * Q5.0.8::      Why does edt emulation not work?
792 * Q5.0.9::      How can I emulate VI and use it as my default mode?
793 * Q5.0.10::     [This question intentionally left blank]
794 * Q5.0.11::     How do I turn on filladapt for all buffers?
795 * Q5.0.12::     How do I disable gnuserv from opening a new frame?
796 * Q5.0.13::     How do I start gnuserv so that each subsequent XEmacs is a client?
797 * Q5.0.14::     Strange things are happening in Shell Mode.
798 * Q5.0.15::     Where do I get the latest CC Mode?
799 * Q5.0.16::     I find auto-show-mode disconcerting.  How do I turn it off?
800 * Q5.0.17::     How can I get two instances of info?
801 * Q5.0.18::     [This question intentionally left blank]
802 * Q5.0.19::     Is there something better than LaTeX mode?
803 * Q5.0.20::     Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
804
805 Emacs Lisp Programming Techniques:
806 * Q5.1.1::      The difference in key sequences between XEmacs and GNU Emacs?
807 * Q5.1.2::      Can I generate "fake" keyboard events?
808 * Q5.1.3::      Could you explain `read-kbd-macro' in more detail?
809 * Q5.1.4::      What is the performance hit of `let'?
810 * Q5.1.5::      What is the recommended use of `setq'?
811 * Q5.1.6::      What is the typical misuse of `setq'?
812 * Q5.1.7::      I like the the `do' form of cl, does it slow things down?
813 * Q5.1.8::      I like recursion, does it slow things down?
814 * Q5.1.9::      How do I put a glyph as annotation in a buffer?
815 * Q5.1.10::     `map-extents' won't traverse all of my extents!
816 * Q5.1.11::     My elisp program is horribly slow.  Is there an easy way to find out where it spends time?
817
818 Sound:
819 * Q5.2.1::      How do I turn off the sound?
820 * Q5.2.2::      How do I get funky sounds instead of a boring beep?
821 * Q5.2.3::      What's NAS, how do I get it?
822 * Q5.2.4::      Sunsite sounds don't play.
823
824 Miscellaneous:
825 * Q5.3.1::      How do you make XEmacs indent CL if-clauses correctly?
826 * Q5.3.2::      Fontifying hangs when editing a postscript file.
827 * Q5.3.3::      How can I print WYSIWYG a font-locked buffer?
828 * Q5.3.4::      Getting M-x lpr to work with postscript printer.
829 * Q5.3.5::      How do I specify the paths that XEmacs uses for finding files?
830 * Q5.3.6::      [This question intentionally left blank]
831 * Q5.3.7::      Can I have the end of the buffer delimited in some way?
832 * Q5.3.8::      How do I insert today's date into a buffer?
833 * Q5.3.9::      Are only certain syntactic character classes available for abbrevs?
834 * Q5.3.10::     How can I get those oh-so-neat X-Face lines?
835 * Q5.3.11::     How do I add new Info directories?
836 * Q5.3.12::     What do I need to change to make printing work?
837
838 \1f
839 File: xemacs-faq.info,  Node: Q5.0.1,  Next: Q5.0.2,  Prev: Miscellaneous,  Up: Miscellaneous
840
841 5.0: Major & Minor Modes
842 ========================
843
844 Q5.0.1: How can I do source code highlighting using font-lock?
845 --------------------------------------------------------------
846
847    For most modes, font-lock is already set up and just needs to be
848 turned on.  This can be done by `M-x font-lock-mode', or by having
849 XEmacs automatically start it by adding lines like:
850
851      (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
852      (add-hook 'dired-mode-hook      'turn-on-font-lock)
853
854    to your `.emacs'.  See the file `etc/sample.emacs' for more examples.
855
856    See also `Syntax Highlighting' from the `Options' menu.  Remember to
857 save options.
858
859 \1f
860 File: xemacs-faq.info,  Node: Q5.0.2,  Next: Q5.0.3,  Prev: Q5.0.1,  Up: Miscellaneous
861
862 Q5.0.2: I do not like cc-mode.  How do I use the old c-mode?
863 ------------------------------------------------------------
864
865    Well, first off, consider if you really want to do this.  cc-mode is
866 much more powerful than the old c-mode.  If you're having trouble
867 getting your old offsets to work, try using `c-set-offset' instead.
868 You might also consider using the package `cc-compat'.
869
870    But, if you still insist, add the following lines to your `.emacs':
871
872      (fmakunbound 'c-mode)
873      (makunbound 'c-mode-map)
874      (fmakunbound 'c++-mode)
875      (makunbound 'c++-mode-map)
876      (makunbound 'c-style-alist)
877      (load-library "old-c-mode")
878      (load-library "old-c++-mode")
879
880    This must be done before any other reference is made to either
881 c-mode or c++-mode.
882
883 \1f
884 File: xemacs-faq.info,  Node: Q5.0.3,  Next: Q5.0.4,  Prev: Q5.0.2,  Up: Miscellaneous
885
886 Q5.0.3: How do I get `More' Syntax Highlighting on by default?
887 --------------------------------------------------------------
888
889    Use the following code in your `.emacs':
890
891      (setq-default font-lock-maximum-decoration t)
892
893    In versions of XEmacs prior to 19.14, you had to use a kludgy
894 solution like this:
895
896      (setq c-font-lock-keywords c-font-lock-keywords-2
897            c++-font-lock-keywords c++-font-lock-keywords-2
898            lisp-font-lock-keywords lisp-font-lock-keywords-2)
899
900    It will work for C, C++ and Lisp.
901
902    See also `Syntax Highlighting' from the `Options' menu.  Remember to
903 save options.
904
905 \1f
906 File: xemacs-faq.info,  Node: Q5.0.4,  Next: Q5.0.5,  Prev: Q5.0.3,  Up: Miscellaneous
907
908 Q5.0.4: How can I enable auto-indent?
909 -------------------------------------
910
911    Put the following line in your `.emacs':
912
913      (setq indent-line-function 'indent-relative-maybe)
914
915    If you want to get fancy, try the `filladapt' package available
916 standard with XEmacs.  Put this into your `.emacs':
917
918      (require 'filladapt)
919      (add-hook 'text-mode-hook    'turn-on-filladapt-mode)
920      ;;; and others ...
921
922    You can customize filling and adaptive filling with Customize.
923 Select from the `Options' menu
924 `Customize->Emacs->->Editing->Fill->Fill...' or type `M-x customize
925 <RET> fill <RET>'.
926
927    Note that well-behaving text-lookalike modes will run
928 `text-mode-hook' by default (e.g. that's what Message does).  For the
929 nasty ones, you'll have to provide the `add-hook's yourself.
930
931    Please note that the `fa-extras' package is no longer useful.
932
933 \1f
934 File: xemacs-faq.info,  Node: Q5.0.5,  Next: Q5.0.6,  Prev: Q5.0.4,  Up: Miscellaneous
935
936 Q5.0.5: How can I get XEmacs to come up in text/auto-fill mode by default?
937 --------------------------------------------------------------------------
938
939    Try the following lisp in your `.emacs':
940
941      (setq default-major-mode 'text-mode)
942      (setq text-mode-hook 'turn-on-auto-fill)
943
944    *WARNING*: note that changing the value of `default-major-mode' from
945 `fundamental-mode' can break a large amount of built-in code that
946 expects newly created buffers to be in `fundamental-mode'.  (Changing
947 from `fundamental-mode' to `text-mode' might not wreak too much havoc,
948 but changing to something more exotic like a lisp-mode would break many
949 Emacs packages).
950
951    Note that Emacs by default starts up in buffer `*scratch*' in
952 `initial-major-mode', which defaults to `lisp-interaction-mode'. Thus
953 adding the following form to your Emacs init file will cause the
954 initial `*scratch*' buffer to be put into auto-fill'ed `text-mode':
955
956      (setq initial-major-mode
957            (lambda ()
958              (text-mode)
959              (turn-on-auto-fill)))
960
961    Note that after your init file is loaded, if
962 `inhibit-startup-message' is `nil' (the default) and the startup buffer
963 is `*scratch*' then the startup message will be inserted into
964 `*scratch*'; it will be removed after a timeout by erasing the entire
965 `*scratch*' buffer.  Keep in mind this default usage of `*scratch*' if
966 you desire any prior manipulation of `*scratch*' from within your Emacs
967 init file. In particular, anything you insert into `*scratch*' from
968 your init file will be later erased. Also, if you change the mode of
969 the `*scratch*' buffer, be sure that this will not interfere with
970 possible later insertion of the startup message (e.g. if you put
971 `*scratch*' into a nonstandard mode that has automatic font lock rules,
972 then the startup message might get fontified in a strange foreign
973 manner, e.g. as code in some programming language).
974
975 \1f
976 File: xemacs-faq.info,  Node: Q5.0.6,  Next: Q5.0.7,  Prev: Q5.0.5,  Up: Miscellaneous
977
978 Q5.0.6: How do I start up a second shell buffer?
979 ------------------------------------------------
980
981    In the `*shell*' buffer:
982
983      M-x rename-buffer <RET> *shell-1* <RET>
984      M-x shell RET
985
986    This will then start a second shell.  The key is that no buffer named
987 `*shell*' can exist.  It might be preferable to use `M-x
988 rename-uniquely' to rename the `*shell*' buffer instead of `M-x
989 rename-buffer'.
990
991    Alternately, you can set the variable `shell-multiple-shells'.  If
992 the value of this variable is non-nil, each time shell mode is invoked,
993 a new shell is made
994
995 \1f
996 File: xemacs-faq.info,  Node: Q5.0.7,  Next: Q5.0.8,  Prev: Q5.0.6,  Up: Miscellaneous
997
998 Q5.0.7: Telnet from shell filters too much
999 ------------------------------------------
1000
1001    I'm using the Emacs `M-x shell' function, and I would like to invoke
1002 and use a telnet session within it.  Everything works fine except that
1003 now all `^M''s are filtered out by Emacs.  Fixes?
1004
1005    Use `M-x rsh' or `M-x telnet' to open remote sessions rather than
1006 doing rsh or telnet within the local shell buffer.  Starting with
1007 XEmacs-20.3 you can also use `M-x ssh' to open secure remote session if
1008 you have `ssh' installed.
1009
1010 \1f
1011 File: xemacs-faq.info,  Node: Q5.0.8,  Next: Q5.0.9,  Prev: Q5.0.7,  Up: Miscellaneous
1012
1013 Q5.0.8: Why does edt emulation not work?
1014 ----------------------------------------
1015
1016    We don't know, but you can use tpu-edt emulation instead, which works
1017 fine and is a little fancier than the standard edt emulation.  To do
1018 this, add the following line to your `.emacs':
1019
1020      (tpu-edt)
1021
1022    If you don't want it to replace `C-h' with an edt-style help menu
1023 add this as well:
1024
1025      (global-set-key [(control h)] 'help-for-help)
1026
1027 \1f
1028 File: xemacs-faq.info,  Node: Q5.0.9,  Next: Q5.0.10,  Prev: Q5.0.8,  Up: Miscellaneous
1029
1030 Q5.0.9: How can I emulate VI and use it as my default mode?
1031 -----------------------------------------------------------
1032
1033    Our recommended VI emulator is viper. To make viper-mode the default,
1034 add this to your `.emacs':
1035
1036      (viper-mode)
1037
1038    Michael Kifer <kifer@CS.SunySB.EDU> writes:
1039
1040      This should be added as close to the top of `.emacs' as you can get
1041      it, otherwise some minor modes may not get viper-ized.
1042
1043 \1f
1044 File: xemacs-faq.info,  Node: Q5.0.10,  Next: Q5.0.11,  Prev: Q5.0.9,  Up: Miscellaneous
1045
1046 Q5.0.10: [This question intentionally left blank]
1047 -------------------------------------------------
1048
1049    Obsolete question, left blank to avoid renumbering
1050
1051 \1f
1052 File: xemacs-faq.info,  Node: Q5.0.11,  Next: Q5.0.12,  Prev: Q5.0.10,  Up: Miscellaneous
1053
1054 Q5.0.11: How do I turn on filladapt for all buffers?
1055 ----------------------------------------------------
1056
1057    Filladapt is a minor mode and minor modes are traditionally off by
1058 default.  The following added to your `.emacs' will turn it on for all
1059 buffers:
1060
1061      (setq-default filladapt-mode t)
1062
1063    Use `turn-on-filladapt-mode' to turn Filladapt on in particular
1064 major modes, like this:
1065
1066      (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
1067
1068 \1f
1069 File: xemacs-faq.info,  Node: Q5.0.12,  Next: Q5.0.13,  Prev: Q5.0.11,  Up: Miscellaneous
1070
1071 Q5.0.12: How do I disable gnuserv from opening a new frame?
1072 -----------------------------------------------------------
1073
1074    If you set the `gnuserv-frame' variable to the frame that should be
1075 used to display buffers that are pulled up, a new frame will not be
1076 created. For example, you could put
1077
1078      (setq gnuserv-frame (selected-frame))
1079
1080    early on in your `.emacs', to ensure that the first frame created is
1081 the one used for your gnuserv buffers.
1082
1083    Starting in 19.15, there is an option to set the gnuserv target to
1084 the current frame.  See `Options->"Other Window" Location->Make current
1085 frame gnuserv target'
1086
1087    Starting with XEmacs-20.3 you can also change this with Customize.
1088 Select from the `Options' menu
1089 `Customize->Emacs->Environment->Gnuserv->Gnuserv Frame...' or type `M-x
1090 customize <RET> gnuserv <RET>'.
1091
1092 \1f
1093 File: xemacs-faq.info,  Node: Q5.0.13,  Next: Q5.0.14,  Prev: Q5.0.12,  Up: Miscellaneous
1094
1095 Q5.0.13: How do I start gnuserv so that each subsequent XEmacs is a client?
1096 ---------------------------------------------------------------------------
1097
1098    Put the following in your `.emacs' file to start the server:
1099
1100      (gnuserv-start)
1101
1102    Start your first XEmacs as usual.  After that, you can do:
1103
1104      gnuclient randomfilename
1105
1106    from the command line to get your existing XEmacs process to open a
1107 new frame and visit randomfilename in that window. When you're done
1108 editing randomfilename, hit `C-x #' to kill the buffer and get rid of
1109 the frame.
1110
1111    See also man page of gnuclient.
1112
1113 \1f
1114 File: xemacs-faq.info,  Node: Q5.0.14,  Next: Q5.0.15,  Prev: Q5.0.13,  Up: Miscellaneous
1115
1116 Q5.0.14: Strange things are happening in Shell Mode.
1117 ----------------------------------------------------
1118
1119    Sometimes (i.e. it's not repeatable, and I can't work out why it
1120 happens) when I'm typing into shell mode, I hit return and only a
1121 portion of the command is given to the shell, and a blank prompt is
1122 returned.  If I hit return again, the rest of the previous command is
1123 given to the shell.
1124
1125    Martin Buchholz <martin@xemacs.org> writes:
1126
1127      There is a known problem with interaction between `csh' and the
1128      `filec' option and XEmacs.  You should add the following to your
1129      `.cshrc':
1130
1131           if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
1132
1133 \1f
1134 File: xemacs-faq.info,  Node: Q5.0.15,  Next: Q5.0.16,  Prev: Q5.0.14,  Up: Miscellaneous
1135
1136 Q5.0.15: Where do I get the latest CC Mode?
1137 -------------------------------------------
1138
1139    Barry A. Warsaw <bwarsaw@cnri.reston.va.us> writes:
1140
1141      This can be had from `http://www.python.org/emacs/'.
1142
1143 \1f
1144 File: xemacs-faq.info,  Node: Q5.0.16,  Next: Q5.0.17,  Prev: Q5.0.15,  Up: Miscellaneous
1145
1146 Q5.0.16: I find auto-show-mode disconcerting.  How do I turn it off?
1147 --------------------------------------------------------------------
1148
1149    `auto-show-mode' controls whether or not a horizontal scrollbar
1150 magically appears when a line is too long to be displayed.  This is
1151 enabled by default.  To turn it off, put the following in your `.emacs':
1152
1153      (setq auto-show-mode nil)
1154      (setq-default auto-show-mode nil)
1155
1156 \1f
1157 File: xemacs-faq.info,  Node: Q5.0.17,  Next: Q5.0.18,  Prev: Q5.0.16,  Up: Miscellaneous
1158
1159 Q5.0.17: How can I get two instances of info?
1160 ---------------------------------------------
1161
1162    You can't.  The `info' package does not provide for multiple info
1163 buffers.
1164
1165 \1f
1166 File: xemacs-faq.info,  Node: Q5.0.18,  Next: Q5.0.19,  Prev: Q5.0.17,  Up: Miscellaneous
1167
1168 Q5.0.18: [This question intentionally left blank]
1169 -------------------------------------------------
1170
1171 \1f
1172 File: xemacs-faq.info,  Node: Q5.0.19,  Next: Q5.0.20,  Prev: Q5.0.18,  Up: Miscellaneous
1173
1174 Q5.0.19: Is there something better than LaTeX mode?
1175 ---------------------------------------------------
1176
1177    David Kastrup <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> writes:
1178
1179      The standard TeX modes leave much to be desired, and are somewhat
1180      leniently maintained.  Serious TeX users use AUC TeX (*note
1181      Q4.7.1::).
1182
1183 \1f
1184 File: xemacs-faq.info,  Node: Q5.0.20,  Next: Q5.1.1,  Prev: Q5.0.19,  Up: Miscellaneous
1185
1186 Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
1187 ---------------------------------------------------------------------------------------------------------
1188
1189    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
1190      Here is one of the solutions, we have this in a script called
1191      `etc/editclient.sh'.
1192            #!/bin/sh
1193            if gnuclient -batch -eval t >/dev/null 2>&1
1194            then
1195              exec gnuclient ${1+"$@"}
1196            else
1197              xemacs -unmapped -f gnuserv-start &
1198              until gnuclient -batch -eval t >/dev/null 2>&1
1199              do
1200                 sleep 1
1201              done
1202              exec gnuclient ${1+"$@"}
1203            fi
1204
1205      Note that there is a known problem when running XEmacs and
1206      'gnuclient -nw' on the same TTY.
1207
1208 \1f
1209 File: xemacs-faq.info,  Node: Q5.1.1,  Next: Q5.1.2,  Prev: Q5.0.20,  Up: Miscellaneous
1210
1211 5.1: Emacs Lisp Programming Techniques
1212 ======================================
1213
1214 Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
1215 -----------------------------------------------------------------------------
1216
1217    Erik Naggum <clerik@naggum.no> writes;
1218
1219      Emacs has a legacy of keyboards that produced characters with
1220      modifier bits, and therefore map a variety of input systems into
1221      this scheme even today.  XEmacs is instead optimized for X events.
1222      This causes an incompatibility in the way key sequences are
1223      specified, but both Emacs and XEmacs will accept a key sequence as
1224      a vector of lists of modifiers that ends with a key, e.g., to bind
1225      `M-C-a', you would say `[(meta control a)]' in both Emacsen.
1226      XEmacs has an abbreviated form for a single key, just (meta
1227      control a).  Emacs has an abbreviated form for the Control and the
1228      Meta modifiers to string-characters (the ASCII characters), as in
1229      `\M-\C-a'.  XEmacs users need to be aware that the abbreviated
1230      form works only for one-character key sequences, while Emacs users
1231      need to be aware that the string-character is rather limited.
1232      Specifically, the string-character can accommodate only 256
1233      different values, 128 of which have the Meta modifier and 128 of
1234      which have not.  In each of these blocks, only 32 characters have
1235      the Control modifier.  Whereas `[(meta control A)]' differs from
1236      `[(meta control a)]' because the case differs, `\M-\C-a' and
1237      `\M-\C-A' do not.  Programmers are advised to use the full common
1238      form, both because it is more readable and less error-prone, and
1239      because it is supported by both Emacsen.
1240
1241    Another (even safer) way to be sure of the key-sequences is to use
1242 the `read-kbd-macro' function, which takes a string like `C-c <up>',
1243 and converts it to the internal key representation of the Emacs you
1244 use.  The function is available both on XEmacs and GNU Emacs.
1245
1246 \1f
1247 File: xemacs-faq.info,  Node: Q5.1.2,  Next: Q5.1.3,  Prev: Q5.1.1,  Up: Miscellaneous
1248
1249 Q5.1.2: Can I generate "fake" keyboard events?
1250 ----------------------------------------------
1251
1252    I wonder if there is an interactive function that can generate
1253 "fake" keyboard events.  This way, I could simply map them inside
1254 XEmacs.
1255
1256    This seems to work:
1257
1258      (defun cg--generate-char-event (ch)
1259        "Generate an event, as if ch has been typed"
1260        (dispatch-event (character-to-event ch)))
1261      
1262      ;;  Backspace and Delete stuff
1263      (global-set-key [backspace]
1264        (lambda () (interactive) (cg--generate-char-event 127)))
1265      (global-set-key [unknown_keysym_0x4]
1266        (lambda () (interactive) (cg--generate-char-event 4)))
1267