Nowadays, XEmacs is essentially dead. The last major release was XEmacs 21 in 1999; the last minor release to be promoted stable was XEmacs 21.4 in 2003, and the last maintenance release was XEmacs 21.4.22 in 2009. I don't think there is any major XEmacs feature that isn't in GNU Emacs 23.
Historically, XEmacs was for a long time (from the Lucid days in the late 1980s to GNU Emacs's catch-up in the mid-200s) about one major version ahead of GNU Emacs in terms of features. XEmacs tended to be quicker at adopting new features and was more liberal in accepting outside code. GNU Emacs was tightly maintained; less buggy and less featured.
Among the last major XEmacs features to appear in GNU Emacs (in Emacs 22 or 23) were the ability to send external commands to a running process (gnuclient
vs. emacsclient
), the ability to connect one instance to multiple terminal types (text or GUI), support for inline images, support for variable-width fonts, the ability to use vector fonts under X, and better support for character sets wider than 8 bits (especially Unicode).
The lisp dialects are the same (except for minor differences). Lisp packages for one variant can usually work under the other variant with a few minor adaptations, unless they make sophisticated use of one of the many features that exist in both variants but with completely different implementations.
Both GNU Emacs and XEmacs run under major unix variants, under Windows and under OSX's native user interface.
I can't see any reason to use XEmacs these days, unless you've been using it for a long time and don't feel like switching.
The init file is traditionally ~/.emacs
, but modern versions also look at other names. There may be confusion about what your home directory is (there shouldn't be on unix platforms, though; this is mostly a problem under Windows); opening ~/.emacs
inside Emacs is always right. After Emacs has started, check for messages in the *Messages*
buffer. Make sure you're not running Emacs with options like -q
that would tell it to bypass your init file.
Best Answer
If you want to open the whole file (which requires ), but show only part of it in the editor window, use narrowing. Select the part of the buffer you want to work on and press
C-x n n
(narrow-to-region
). Say “yes” if you get a prompt about a disabled command. PressC-x n w
(widen
) to see the whole buffer again. If you save the buffer, the complete file is selected: all the data is still there, narrowing only restricts what you see.If you want to view a part of a file, you can insert it into the current buffer with
shell-command
with a prefix argument (M-1 M-!
); run the appropriate command to extract the desired lines, e.g.<huge.txt tail -n +57890001 | head -n 11
.There is also a Lisp function
insert-file-contents
which can take a byte range. You can invoke it withM-:
(eval-expression
):Note that you may run into the integer size limit (version- and platform-dependent, check the value of
most-positive-fixnum
).In theory it would be possible to write an Emacs mode that loads and saves parts of files transparently as needed (though the limit on integer sizes would make using actual file offsets impossible on 32-bit machines). The only effort in that direction that I know of is VLF (GitHub link here).