I'll be discussing some of the Emacs 23 specific tricks in some future entries, here I will discuss a small number of visible ones. This does not even scratch the surface of what is new - it's just a little taster.
One of the biggest, user-visible changes in Emacs 23 is the support for anti-aliased fonts on X11. This means that the fonts will look much smoother -- and as noted, users feel more effective when using pretty technology. In this case, some pictures are probably in order; the two screenshots show emacs-22 versus emacs-23, using default settings. The difference is striking, to say the least.
Emacs also supports variable-width fonts, so you could use any TrueType (and some other) font. However, I prefer to use a fixed-width font; a nice one is the Inconsolata font (ttf-inconsolata in Ubuntu/Debian, inconsolata-fonts in Fedora).
Another interesting new feature is DBUS-support; D-Bus is an IPC system used on Linux/Unix to communicate between applications. Using D-Bus, Emacs now even has support for querying the network for ZeroConf-devices when you are using Avahi; for example, insert a list of all printers in the local network into the current buffer, you could do something like:
(require 'zeroconf)
(zeroconf-init)
(dolist (srv (zeroconf-list-services "_printer._tcp"))
(insert (format "\nprinter: %s" (nth 2 srv))))
Of course, this is not so useful. But being able to use Zeroconf (and D-Bus) easily from within emacs enables all kinds of interesting hacks... to be continued.
A maybe-useful graphical gimmick is that you can now change the 'opacity' (non-transparency) of your emacs frame (window) if you're on MS-Windows, or on some X with compositing enabled (Compiz, metacity-with-compositing, ...).
(modify-frame-parameters (selected-frame)
`((alpha . 90)))
will make your frame (window) 90% opaque (ie., 10% transparant).
If you're very conservative, you should of course wait for the official release of the new emacs. If you are a bit more adventurous, I can definitely recommend it. I have not come across any bugs. Of course, your mileage may vary.
The easiest way to get emacs 23 is to get some prebuilt packages;
- For Windows, Ian Eure's MacOS-packages (haven't tested those);
- For Debian, you can get emacs-snapshot-packages from orebokech, which are update weekly;
- For Ubuntu, there are emacs-snapshot-packages from Ubuntu-Elisp
I guess there must be similar packages for Fedora/Suse/... but I could only find some older packages from EmacsCvsAndFedora. That says more about my searching skill than anything else, I guess... You can however also compile the new emacs yourself; it's not too difficult and there are some instructions in EmacsWiki, but note that the page is partly outdated.
Final note: if you have to have some emacs-23 specific code in your .emacs, but you also need emacs-22, you can use some like:
(when (>= emacs-major-version 23)
;; do something only in emacs 23
)
No comments:
Post a Comment