Emacs 23.2 Features (released 2010-05)
This page is a preliminary report on new features in emacs 23.2.
Emacs 23.2 is released on , just 9 months from the previous major release, Emacs 23 (23.1). 〔►see Emacs 23.1 New Features (released 2009-07)〕
Emacs 23.2 has lots of significant new features. The most significant is probably the inclusion of the CEDET package, which is a huge IDE-like package with features to parse different languages. CEDET is written by Eric Ludlam. I'll be studying this package and document its features for practical use.
A much more advanced js mode, named js2-mode, by Steve Yegge, is not chosen. Rather sad. Steve's mode features a on-the-fly js parser (written in elisp). It actually validate js code as you type, similar to nxml mode by the XML expert James Clark.
Steve's “js2-mode” was being attacked in the GNU dev mailing list in 2009-08 (by more or less just one guy). Steve, is a humble guy at least in his public writing. He promised to fix whatever the mentioned issues to combine it with (alleged) advantages of espresso mode. (Source lists.gnu.org)
Full thread on “js2-mode” at Source lists.gnu.org. Look for subject name “Why js2-mode in Emacs 23.2” dated 2009-08-09.
nxml for XML now default
nxml-mode, by the XML expert James Clark, was included in emacs 23.1, but somehow isn't default when you open a XML file. Now it is. I filed a bug report on this.
A new package,
htmlfontify.el turns a syntax colored buffer into HTML code.
Written by Vivek Dasmohapatra.
This is used for publishing code on the web. The command name is
This package is similar to the
htmlize.el package by Hrvoje Niksic. I've been using htmlize for the past 4 years. See: Using Emacs To Syntax Color Source Code In HTML.
Also, htmlize existed since at least 2007. However, in a private email Hrvoje Niksic told me he refuse to work with FSF (or something like that), even though the code is released in GPL. I completely sympathizes with him, and i have come to dislike the bureaucratic inefficiency and propaganda from FSF. (See: “Free” Software Morality, Richard Stallman, Paperwork Bureaucracy • My Experience of Emacs vs XEmacs.)
Other New Features
Opening Large Files
Emacs can now open files up to 512MB in size, doubling previous.
async-shell-command 【Alt+&】. It runs a shell command in the background.
This is equivalent to Alt+x
shell-command 【Alt+!】, with a
Convenient Cursor Moving
A new command
move-to-window-line-top-bottom, with hotkey 【Alt+r】, will move cursor to top, center, or bottom of current window. Repeated call cycle these locations. This is a complement to 【Ctrl+l】 (
I don't think this is necessarily a good feature. Emacs's is filled with tens of these little commands for text editing. Their problem is that there are too many specific commands with hard to remember keys that are also many keystrokes, and puts a burden on user to become familiar with all these commands and call them in specific situations. Better would be a few powerful commands on easy keys that are context sensitive. So, you can just remember 10 commands, and call 2 or 3 of them in sequence, instead of remembering 20 or 30 special commands each having complicated combo keystrokes. For examples, see: mark-word problem • fill-paragraph problem • isearch problem.
For Elisp Coders
Glad to note that recursive option is added to the elisp commands
A great feature
for those who use elisp for sys admin and text processing. This
fixed a bug i've reported, see: A
Function For Copying and Deleting Whole Dir. This means, lots of my text
processing scripts don't have to make system calls
rm -r anymore. This solves many cross-platform complexities
especially on Windows.
For reasons why elisp is perhaps the best text processing lang, see: Text Processing: Emacs Lisp vs Perl.
Centralize Config Files to 〔~/.emacs.d/〕
Some config files are moved from the
~/ dir to
~/.emacs.d/. Examples are
If you already have these
~/, your file will still work and won't be moved automatically. You
might want to move them. Also, the path
~/emacs.d/ is the default value of
the variable user-emacs-directory.
Note, that Bookmark's file is still at
~/.emacs.bmk, and recently opened file (
recentf-mode) data is still at
Emacs does not have a policy on where package's data should be saved, nor a unified location for user installed packages. By this emacs 23.2 move, it appears that program data should now be at the var user-emacs-directory.
On a separate note, the
desktop-save-mode's data is at
~/.emacs.d/.emacs.desktop, however, one problem is when emacs quit, it bugs the user by asking them to save the desktop file location. There are 2 problem with this: ① if emacs crashed or OS crashed, the currently opened files are not saved. ② it bothers the user by asking.
dired auto refresh
dired has new variable dired-auto-revert-buffer. If set to “t”, then when you open a directory, the listing will be refreshed (that is, it automatically calls
This improvement doesn't really do much. The problems are:
- ① The default value of dired-auto-revert-buffer is false (nil).
- ② Even set to t, it does not refresh if you switch to a existing dired buffer. It works when you actually “visit” a existing dired buffer. That is, you Alt+x
I think xemacs has a robust auto-refresh feature long ago.
Emacs 23.2 Changes on Minor Mode Command Parameter
Before emacs 23.2, when a minor mode function is called in lisp code, no argument such as
(auto-fill-mode) will toggle the mode.
After emacs 23.x, a mode command without any argument used in emacs lisp code will always turn it on.
Though, there might still be some minor mode having the old behavior.
Here's historical note about this change, by Stefan Monnier (one of the current emacs maintainer) in a post in comp.emacs on , see http://groups.google.com/group/gnu.emacs.help/msg/053750ca833da940
There are quite a few other features i didn't cover here. Many are related to emacs running in Linux. If you like to read the official release notes, see: emacs23.2_features_official.txt.
Addendum: David Capello and me released a new ErgoEmacs distribution based on 23.2, download it at: http://code.google.com/p/ergoemacs/downloads/list.