Monday, April 7, 2008

Have you checked the Emacs NEWS file?

When you download and install the latest Emacs release, always check the release notes by checking the NEWS file. This can be pulled up by hitting C-h n in any Emacs buffer.

The NEWS file contains all the changes incorporated in the current release and has all the feature list implemented in the major release number. So NEWS.21 will have all the information about 21.x releases and NEWS.20 about the 20.x and so on.

Why should you check the NEWS file?

Well, you really don't as most Emacs features will probably work the way you expect them to work. When you upgrade and some feature breaks(very rare), the first thing is to check the NEWS to see whether the defaults have been changed.

As was my case in

** The HOME directory defaults to Application Data under the user profile.

If you used a previous version of Emacs without setting the HOME
environment variable and a `.emacs' was saved, then Emacs will continue
using C:/ as the default HOME. But if you are installing Emacs afresh,
the default location will be the "Application Data" (or similar
localized name) subdirectory of your user profile. A typical location
of this directory is "C:\Documents and Settings\USERNAME\Application Data",
where USERNAME is your user name.

This change means that users can now have their own `.emacs' files on
shared computers, and the default HOME directory is less likely to be
read-only on computers that are administered by someone else.
When I copied my installation over without my .Emacs into a new machine, it was irritating to see it look under the above "Application Data" folder. A quick look at the NEWS file, sorted that out.

Then again, another feature which I think should not have been implemented(I think it encourages bad practices with OSes which are not well designed to work with file names with spaces)
** When Emacs prompts for file names, SPC no longer completes the file name.
This is so filenames with embedded spaces could be input without the
need to quote the space with a C-q. The underlying changes in the
keymaps that are active in the minibuffer are described below under
"New keymaps for typing file names".

If you want the old behavior back, add these two key bindings to your
~/.emacs init file:

(define-key minibuffer-local-filename-completion-map
" " 'minibuffer-complete-word)
(define-key minibuffer-local-must-match-filename-map
" " 'minibuffer-complete-word)
The NEWS also has new features that have been implemented, bugs that have been fixed, popular lisp packages which have been folded into the main tree and deprecated support for various platforms.

Make sure you READ the NEWS file before reporting any bug too.