XEmacs FAQ [1/6]


------------------------------

Subject: Introduction

This is the guide to the XEmacs Frequently Asked Questions list it is a compendium of questions and answers pertaining to one of the finest programs ever written. It is much more than just a Text Editor.

Learning XEmacs is a lifelong activity. I've been using Emacs for over a decade now, and I'm still discovering new features. Therefore this document cannot be complete. Instead it is aimed at the person who is either considering XEmacs for their own use, or has just obtained it and is wondering what to do next. It is also useful as a reference to available resources.

The previous maintainer of the FAQ was Anthony Rossini <rossini@stat.sc.edu>, who started it, after getting tired of hearing JWZ complain about repeatedly having to answer questions. Ben Wing <ben@666.com> and Chuck Thompson <cthomp@xemacs.org>, the principal authors of XEmacs, then took over and Ben did a massive update reorganizing the whole thing. At which point Anthony took back over, but then had to give it up again . Some of the other contributors to this FAQ are listed later in this document.

The previous version was converted to hypertext format, and edited by Steven L. Baur <steve@altair.xemacs.org>.

Since Steve Baur is so busy putting out multiple versions of XEmacs I have taken on the task of maintaining the FAQ. I use XEmacs on a daily basis and I wanted to give something back to the community that has made XEmacs possible. If you notice any errors or items which should be added or amended to this FAQ please send email to Andreas Kaempf <andreas@sccon.com>. Include XEmacs FAQ on the Subject: line.

This FAQ is freely redistributable. I take no liability for the correctness and safety of any procedures or advice given here. This FAQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you have a Web browser, the official hypertext version is at: <http://www.sccon.com/~andreas/xemacs-faq.html>, and also at: <http://www.xemacs.org/faq/xemacs-faq.html>. This version is much nicer than the unofficial hypertext versions that are archived at Utrecht, Oxford, Smart Pages, and other FAQ archives.

Changes this month:

This file was last modified on Feburary 23, 1998.

------------------------------

Subject: Roadmap


1.0 Introduction


------------------------------

Subject: Q1.0.1 What is XEmacs?

An alternative to GNU Emacs, originally based on an early alpha version of FSF's version 19, and has diverged quite a bit since then. XEmacs was known as Lucid Emacs through version 19.10. Almost all features of GNU Emacs are supported in XEmacs The maintainers of XEmacs actively track changes to GNU Emacs while also working to add new features.

------------------------------

Subject: Q1.0.2 What is the current version of XEmacs?

The current stable version of XEmacs is 20.3, released in December, 1997.

The next feature release will be XEmacs 20.4.

XEmacs 19.16 was the last release of v19, released in November, 1997, which was also the last version without international language support.

------------------------------

Subject: Q1.0.3 Where can I find it?

The canonical source and binaries is found via anonymous FTP at <ftp://ftp.xemacs.org:/pub/xemacs/>

------------------------------

Subject: Q1.0.4 Why Another Version of Emacs

For a detailed description of the differences between GNU Emacs and XEmacs and a detailed history of XEmacs, check out the <http://www.xemacs.org/NEWS.html> file. However, here is a list of some of the reasons why we think you might consider using it:

------------------------------

Subject: Q1.0.5 Why Haven't XEmacs and GNU Emacs Merged?

There are currently irreconcilable differences in the views about technical, programming, design and organizational matters between RMS and the XEmacs development team which provide little hope for a merge to take place in the short-term future.

If you have a comment to add regarding the merge, it is a good idea to avoid posting to the newsgroups, because of the very heated flamewars that often result. Mail your questions to <xemacs-beta@xemacs.org> and<bug-gnu-emacs@prep.ai.mit.edu>.

------------------------------

Subject: Q1.0.6 Where can I get help?

Probably the easiest way, if everything is installed, is to use info, by pressing C-h i, or selecting Emacs Info from the Help Menu. Also, M-x apropos will look for commands for you.

Try reading this FAQ, examining the regular GNU Emacs FAQ (which can be found with the Emacs 19 distribution) as well as at <http://www.eecs.nwu.edu/emacs/faq/> and reading the Usenet group comp.emacs.xemacs. If that does not help, try posting your question to comp.emacs.xemacs. Please Do Not post XEmacs related questions to gnu.emacs.help.

If you cannot post or read Usenet news, there is a corresponding mailing list which is available. It can be subscribed to by sending a message with a subject of subscribe to xemacs-request@xemacs.org for subscription information and xemacs@xemacs.org to send messages to the list.

To cancel a subscription, you must use the xemacs-request address. Send a message with a subject of unsubscribe to be removed.

------------------------------

Subject: Q1.0.7 Where is the mailing list archived?

The mailing list is archived in the directory <ftp://ftp.xemacs.org:/pub/xemacs/mlists/>.

However, this archive is out of date. The current mailing list server supports an `archive' feature, which may be utilized.

------------------------------

Subject: Q1.0.8 How do you pronounce XEmacs?

I pronounce it Eks eemax.

------------------------------

Subject: Q1.0.9 What does XEmacs look like?

Here are some Screen Snapshots:

------------------------------

Subject: Q1.0.10 Is there a port of XEmacs to Microsoft ('95 or NT)?

Thanks to efforts of many people, coordinated by David Hobley <davidh@wr.com.au> and Marc Paquette <marcpa@cam.org>, beta versions of XEmacs now run on 32-bit Windows platforms (NT and 95). The current betas require having an X server to run XEmacs; however, a native NT/95 port is in alpha.

The NT development is now coordinated by a mailing list at <xemacs-nt@xemacs.org>. If you are willing to contribute or want to follow the progress, mail to <xemacs-nt-request@xemacs.org> to subscribe.

Furthermore, Altrasoft is seeking corporate and government sponsors to help fund a fully native port of XEmacs to Windows 95 and NT using full-time, senior-level staff working under a professionally managed project structure.

See <http://www.altrasoft.com/> for more details or contact Altrasoft directly at 1-888-ALTSOFT.

The closest is Win-Emacs, which is based on Lucid Emacs 19.6. Available from <http://www.pearlsoft.com/>.

There's a port of GNU Emacs (not XEmacs) at
<http://www.cs.washington.edu/homes/voelker/ntemacs.html>.

------------------------------

Subject: Q1.0.11 Is there a port of XEmacs to the Macintosh?

There has been a port to the MachTen environment of XEmacs 19.13, but no patches have been submitted to the maintainers to get this in the mainstream distribution.

------------------------------

Subject: Q1.0.12 Is there a port of XEmacs to NextStep?

Carl Edman, apparently no longer at <cedman@princeton.edu>, did the port of FSF Emacs to NeXTstep and expressed interest in doing the XEmacs port, but never went any farther.

------------------------------

Subject: Q1.0.13 Is there a port of XEmacs to OS/2?

No, and there is no news of anyone working on it.

------------------------------

Subject: Q1.0.14 Where can I obtain a printed copy of the XEmacs users manual?

InfoDock Associates, a firm specializing in Emacs-related support and development, will be maintaining the XEmacs user manual. The firm plans to begin publishing printed copies of the manual soon.

Web: <http://www.xemacs.com>

E-mail: <info@xemacs.com>

Tel: +1 408 243 3300

------------------------------

1.1 Policy


------------------------------

Subject: Q1.1.1 What is the FAQ editorial policy?

The FAQ is actively maintained and modified regularly. All links should be up to date.

Changes are displayed on a monthly basis. Months, for this purpose are defined as the 5th of the month through the 5th of the month. Preexisting questions that have been changed are marked as such. Brand new questions are tagged.

All submissions are welcome. E-mail submissions to Andreas Kaempf <andreas@sccon.com>. Please make sure that XEmacs FAQ appears on the Subject: line. If you think you have a better way of answering a question, or think a question should be included, I'd like to hear about it. Questions and answers included into the FAQ will be edited for spelling and grammar, and will be attributed. Answers appearing without attribution are either from versions of the FAQ dated before May 1996, or are from one of the four people listed at the top of this document. Answers quoted from Usenet news articles will always be attributed, regardless of the author.

------------------------------

Subject: Q1.1.2 How do I become a Beta Tester?

Send an email message to <xemacs-beta-request@xemacs.org> with a subject line of subscribe.

Be prepared to get your hands dirty, as beta testers are expected to identify problems as best they can.

------------------------------

Subject: Q1.1.3 How do I contribute to XEmacs itself?

Ben Wing <ben@666.com> writes:

BTW if you have a wish list of things that you want added, you have to speak up about it! More specifically, you can do the following if you want a feature added (in increasing order of usefulness):

(not that we're necessarily requiring you to write the code, but we can always hope :)

------------------------------

1.2 Credits


------------------------------

Subject: Q1.2.1 Who wrote XEmacs?

XEmacs is the result of the time and effort of many people. The developers responsible for the 19.15/20.0 release are: The developers responsible for the 19.14 release are: Jamie Zawinski was Mr. Lucid Emacs from 19.0 through 19.10, the last release actually named Lucid Emacs. Richard Mlynarik was crucial to most of those releases. Along with many other contributors, partially enumerated in the About XEmacs option in the Help menu.

------------------------------

Subject: Q1.2.2 Who contributed to this version of the FAQ?

The following people contributed valuable suggestions to building this version of the FAQ (listed in alphabetical order):

------------------------------

Subject: Q1.2.3 Who contributed to the FAQ in the past?

This is only a partial list, as many names were lost in a hard disk crash some time ago.

------------------------------

1.3 Internationalization


------------------------------

Subject: Q1.3.1 What is the status of XEmacs v20?

XEmacs v20 is the version of XEmacs that includes MULE (Asian-language) support. XEmacs 20.0 was released in February 1997, followed by XEmacs 20.2 in May and XEmacs 20.3 in November. When compiled without MULE support, 20.3 is approximately as stable as 19.16, and probably faster (due to additional optimization work.)

As of XEmacs 20.3, version 20 is the supported version of XEmacs. This means that 19.16 will optionally receive stability fixes (if any), but that all the real development work will be done on the v20 tree.

The incompatible changes in XEmacs 20 include the additional byte-codes, new primitive data types (character, char-table, and range-table). This means that the character-integer equivalence inherent to all the previous Emacs and XEmacs releases no longer applies.

However, to avoid breaking old code, many functions that should normally accept characters work with integers, and vice versa. For more information, see the Lisp reference manual. Here is a relevant excerpt, for your convenience.

In XEmacs version 19, and in all versions of FSF GNU Emacs, a "character" in XEmacs Lisp is nothing more than an integer. This is yet another holdover from XEmacs Lisp's derivation from vintage-1980 Lisps; modern versions of Lisp consider this equivalence a bad idea, and have separate character types. In XEmacs version 20, the modern convention is followed, and characters are their own primitive types. (This change was necessary in order for MULE, i.e. Asian-language, support to be correctly implemented.)

Even in XEmacs version 20, remnants of the equivalence between characters and integers still exist; this is termed the "char-int confoundance disease". In particular, many functions such as eq, equal, and memq have equivalent functions (old-eq, old-equal, old-memq, etc.) that pretend like characters are integers are the same. Byte code compiled under any version 19 Emacs will have all such functions mapped to their old- equivalents when the byte code is read into XEmacs 20. This is to preserve compatibility - Emacs 19 converts all constant characters to the equivalent integer during byte-compilation, and thus there is no other way to preserve byte-code compatibility even if the code has specifically been written with the distinction between characters and integers in mind.

Every character has an equivalent integer, called the "character code". For example, the character A is represented as the integer 65, following the standard ASCII representation of characters. If XEmacs was not compiled with MULE support, the range of this integer will always be 0 to 255 - eight bits, or one byte. (Integers outside this range are accepted but silently truncated; however, you should most decidedly not rely on this, because it will not work under XEmacs with MULE support.) When MULE support is present, the range of character codes is much larger. (Currently, 19 bits are used.)

FSF GNU Emacs uses kludgy character codes above 255 to represent keyboard input of ASCII characters in combination with certain modifiers. XEmacs does not use this (a more general mechanism is used that does not distinguish between ASCII keys and other keys), so you will never find character codes above 255 in a non-MULE XEmacs.

Individual characters are not often used in programs. It is far more common to work with strings, which are sequences composed of characters.

------------------------------

Subject: Q1.3.2 What is the status of Asian-language support, aka MULE?

The MULE support works OK but still needs a fair amount of work before it's really solid. We could definitely use some help here, esp. people who speak Japanese and will use XEmacs/MULE to work with Japanese and have some experience with E-Lisp.

As the fundings on Mule have stopped, Mule part of XEmacs is currently looking for a full-time maintainer. If you can provide help here, or are willing to fund the work, please mail to <xemacs-beta@xemacs.org>. If you can help out here, please see Q1.1.2.

------------------------------

Subject: Q1.3.3 I speak a language that uses a lot of non-ASCII characters. How do I type them in?

See Q3.5.7 in part 3 of this FAQ.

------------------------------

Subject: Q1.3.4 Can I get the messages output by XEmacs to come out in a different language?

The message-catalog support has mostly been written but doesn't currently work. The first release of XEmacs 20 will not support it. However, menubar localization does work, even in 19.14. To enable it, add to your Emacs file entries like this:
Emacs*XlwMenu.resourceLabels: True
Emacs*XlwMenu.file.labelString: Fichier
Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster öffnen
The name of the resource is derived from the non-localized entry by removing punctuation and capitalizing as above. Martin Buchholz <Martin.Buchholz@sun.com> is working on adding support for Asian language menubar localization to XEmacs 20.

------------------------------

Subject: Q1.3.5 Please explain the various input methods in MULE/XEmacs 20.0

MORIOKA Tomohiko <morioka@jaist.ac.jp> writes:
Original Mule supports following input methods: Wnn4, Wnn6, Canna, SJ3 and XIM. Interfaces for Wnn and SJ3 uses the egg user interface. Interface for Canna does not use egg. I don't know about XIM. It is to support ATOK, of course, it may work for another servers.

Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyôto university. It is a powerful and complex system. Wnn4 is free and Wnn6 is not free.

Canna supports only Japanese. It is made by NEC. It is a simple and powerful system. Canna uses only grammar (Wnn uses grammar and probability between words), so I think Wnn is cleverer than Canna, however Canna users made a good grammar and dictionary. So for standard modern Japanese, Canna seems cleverer than Wnn4. In addition, the UNIX version of Canna is free (now there is a Microsoft Windows version).

SJ3 supports only Japanese. It is made by Sony.

XIM supports was made to use ATOK (a major input method in personal computer world). XIM is the standard for accessing input methods bundled in Japanese versions of Solaris. (XEmacs 20 will support XIM input).

Egg consists of following parts:

  1. Input character Translation System (ITS) layer. It translates ASCII inputs to Kana/PinYin/Hangul characters.
  2. Kana/PinYin/Hangul to Kanji transfer layer. It is interface layer for network Kana-Kanji server (Wnn and Sj3).
These input methods are modal, namely there are mode, alphabet mode and Kana-Kanji transfer mode. However there are mode-less input methods for Egg and Canna. Boiled-egg is a mode-less input method running on Egg. For Canna, canna.el has a tiny boiled-egg like command, (canna-boil), and there are some boiled-egg like utilities.

In addition, it was planned to make an abstraction for all transfer type input methods. However authors of input methods are busy, so maybe this plan is stopped. Perhaps after Mule merged FSF Emacs will be released, it will be continued.

------------------------------

Subject: Q1.3.6 How do I portably code for MULE/XEmacs 20.0?

MORIOKA Tomohiko <morioka@jaist.ac.jp> writes:
MULE and XEmacs are quite different. So the application implementor must write separate code for these mule variants.

MULE and the next version of Emacs are similar but the symbols are very different -- requiring separate code as well.

Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of emacs variants... (;_;)

I'm shocked, so I wrote a wrapper package called emu to provide a common interface.

I have the following suggestions about dealing with mule variants:

  1. (featurep 'mule) is t on all mule variants
  2. (boundp 'MULE) is t on only MULE. Maybe the next version of Emacs will not have this symbol.
  3. MULE has a variable mule-version. Perhaps the next version of Emacs will have this variable as well.

Following is a sample to distinguish mule variants:

(if (featurep 'mule)
    (cond ((boundp 'MULE)
           ;; for original Mule
           )
	  ((string-match "XEmacs" emacs-version)
	   ;; for XEmacs with Mule
	   )
	  (t
	   ;; for next version of Emacs
	   ))
  ;; for old emacs variants
  )

------------------------------

Subject: Q1.3.7 How about Cyrillic Modes?

Ilya Zakharevich <ilya@math.ohio-state.edu> writes:

There is a cyrillic mode in the file mysetup.zip in <ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/>.

Dima Barsky <d.barsky@ee.surrey.ac.uk> writes:

There is another cyrillic mode for both GNU Emacs and XEmacs by Dmitrii (Mitya) Manin <manin@camelot.mssm.edu> at
<http://camelot.mssm.edu/~manin/cyr.el>.

------------------------------

1.4 Getting Started, Backing up & Recovery


------------------------------

Subject: Q1.4.1 What is a .emacs and is there one I can look at so I can build my own?

The .emacs file is used to customize XEmacs to your tastes. No two are alike, nor are they expected to be alike, but that's the point. The XEmacs distribution contains an excellent starter example in the etc directory called sample.emacs. Copy this file from there to your home directory and rename it .emacs. Then edit it to suit.

Starting with 19.14, you may bring the sample.emacs into an XEmacs buffer by selecting Help->Sample .emacs from the menubar. To determine the location of the etc directory type the command C-h v data-directory RET.

------------------------------

Subject: Q1.4.2 Can I use the same .emacs with the other Emacs?

Yes. The sample .emacs included in the XEmacs distribution will show you how to handle different versions and flavors of Emacs.

------------------------------

Subject: Q1.4.3 Any good tutorials around?

There's the XEmacs tutorial available from the Help Menu, or by typing C-h t.

There's an Emacs Lisp tutorial at:
<ftp://prep.ai.mit.edu/pub/gnu/emacs-lisp-intro-1.04.tar.gz>.

Erik Sundermann <erik@petaxp.rug.ac.be> has made a tutorial web page at <http://petaxp.rug.ac.be/~erik/xemacs/>.

------------------------------

Subject: Q1.4.4 May I see an example of an XEmacs Lisp function that does something with text near the cursor?

The following function does a little bit of everything useful. It does something with the prefix argument, it examines the text around the cursor, and it's interactive so it may be bound to a key. It inserts copies of the current word the cursor is sitting on at the cursor. If you give it a prefix argument: C-u 3 M-x double-word then it will insert 3 copies.

(defun double-word (count)
       "Insert a copy of the current word underneath the cursor"
       (interactive "*p")
       (let (here there string)
         (save-excursion
           (forward-word -1)
           (setq here (point))
           (forward-word 1)
           (setq there (point))
           (setq string (buffer-substring here there)))
         (while (>= count 1)
           (insert string)
           (decf count))))
The best way to see what is going on here is to let XEmacs tell you. Put the code into an XEmacs buffer, and do a C-h f with the cursor sitting just to the right of the function you want explained. Eg. move the cursor to the SPACE between interactive and "*p" and hit C-h f to see what the function interactive does. Doing this will tell you that the * requires a writable buffer, and p converts the prefix argument to a number, and interactive allows you to execute the command with M-x.

------------------------------

Subject: Q1.4.5 And how do I bind it to a key?

To bind to a key do:
(global-set-key "\C-cd" 'double-word)
Or interactively, M-x global-set-key and follow the prompts.

Jari Aalto has written a guide to Emacs keys binding, available at
<ftp://cs.uta.fi/pub/ssjaaa/ema-keys.gui>.

------------------------------

Subject: Q1.4.6 What's the difference between a macro and a function?

Quoting from the Lisp Reference (a.k.a lispref) Manual:

Macros enable you to define new control constructs and other language features. A macro is defined much like a function, but instead of telling how to compute a value, it tells how to compute another Lisp expression which will in turn compute the value. We call this expression the expansion of the macro.

Macros can do this because they operate on the unevaluated expressions for the arguments, not on the argument values as functions do. They can therefore construct an expansion containing these argument expressions or parts of them.

Do not confuse the two terms with "keyboard macros", which are another matter, entirely. A keyboard macro is a key bound to several other keys. Refer to manual for details.

------------------------------

Subject: Q1.4.7 How come options saved with 19.13 don't work with 19.14 or later?

There's a problem with options of the form:
(add-spec-list-to-specifier (face-property 'searchm-field 'font)
                            '((global (nil))))
saved by a 19.13 XEmacs that causes a 19.14 XEmacs grief. You must delete these options. XEmacs 19.14 and later no longer writes the options directly to .emacs which should allow us to deal with version incompatibilities better in the future.

Options saved under XEmacs 19.13 are protected by code that specifically requires a version 19 XEmacs. This won't be a problem unless you're testing XEmacs v20. You should consider changing the code to read:

(cond
 ((and (string-match "XEmacs" emacs-version)
       (boundp 'emacs-major-version)
       (or (and (= emacs-major-version 19)
                (>= emacs-minor-version 12))
           (>= emacs-major-version 20)))
 ...

This FAQ is Copyright © 1998 by various people and edited by Andreas Kaempf. Please send comments, and suggestions to Andreas Kaempf <andreas@sccon.com>.

 Part 2 =>