|
Emacs' GNU Look: A Sneak Preview of Emacs 21.0
The More Things Change....It's easy to get used to constants in your life. Take GNU Emacs. In one form or another, Emacs has been with me for close to ten years: first as experienced over a VT100, then as a ghost of its keybindings with Borland's extensible Sprint word processor (one of the happier moments before the Word hegemony established itself), and then via Linux where it, well, it was Emacs again...not so different even when run under X than when I first started using it. There are some things we take for granted with Emacs: To users accustomed to the eyecandy of GNOME and KDE, Emacs is a hard sell. It has its own look and feel. The first time I used it under KDE and experienced that environment's habit of inflicting its color scheme on random apps I went into shock: it was truly a case of putting lipstick on a mule. Emacs is from a time before pretty toolkits...before "themeable" was a talking point for software. I learned how to make KDE stop trying to gussy things up and felt better immediately. Because Emacs behaves in a unique manner on the X desktop, it takes a little getting used to. It's nice to have the menus there, and there are elements of the Emacs display that are adjustable with a mouse, but they don't look quite like anything else on your desktop. They don't scream out "click and drag on this thing here!" I suspect there's also a generation of Linux users out there who will never go near Emacs because it looks a little forboding. Yes...it can run under X, providing multiple windows and point-and-click functionality, but it looks a little unhappy doing it. Having noted the disturbing frequency with which "looks cool" and "it's ugly" are used to settle arguments in the desktop wars, it's not hard to imagine that Emacs loses potential users on the basis of its strange looks. Emacs also poses a daunting learning curve. People are often attracted by the incredible functionality offered, and frightened away by the fact that at least a little Lisp is going to come into play to take advantage of all the power under the hood. There's plenty of configuration code out there on the web, though, and it's easy enough to crib. Once they do invest the time, Emacs becomes a place from which some will never return. Built in to this "text editor" is a news reader, a few mail clients, a calendar, appointment book, Tetris, an FTP client, a Telnet client, a web browser, and more. You can climb into an Emacs session and, depending on your temperment and willingness to embrace Lisp, never have to leave. Some find this profoundly disturbing, others find it comforting.
The Pitter-patter of GNOMEish FeetSo, a little while back some screenshots began to surface along with some wild rumors: Emacs, according to some, was in the midst of an overhaul so drastic that it was actually being GNOMEified. I was both curious and frightened: love Emacs, like GNOME, remember how hideous it looked under KDE until I got rid of a few files. Since I'm not, by the way, a software engineer, consternation over Emacs being married to Bonobo was an afterthought. I got a look at some of the screenshots, wrote a few letters, and set out to learn more. I tried to get into the Emacs testing group only to find out that it's very, very closed to non-Lisp-coding, non-exotic-hardware running rabble. At one point I thought I had a lead on an FTP archive where the source was waiting to be plucked like so much ripe fruit, but it led to a dead end and an empty directory. I did learn, though, that the GNOMEification rumors were just that: rumors. One correspondent who did have access to the latest source searched and couldn't find so much as a GTK call anywhere in the tree. I settled down a little. At least I wasn't missing out on the grand unification of my desktop. It nagged at me, though. There was a prettier, more intuitive Emacs out there, somewhere, and I wasn't allowed to see it. I finally got my break on Friday afternoon when a helpful soul pointed me to an out-of-the-way repository with Emacs 21.0 sitting in it. My 1.5 Mb DSL connection made short work of the download, and a few minutes later I was ready to run the latest and greatest. I've spent a few days playing around with this release now, and, having struggled to read the change summary past around line 2000, I can only say that the Emacs sitting on my desktop today is different. How different is dependent on the user, but that incredible customizability is obviously still there, and fairly easy to take advantage of for making some interesting changes to the way Emacs works.
A Superficial RundownOn starting the program up, I immediately understood where the rumors of Emacs' GNOMEification had come from: where the program used to present a very sparse, black and white window with simple, unadorned, menus it now has a toolbar providing a set of basic buttons familiar to anyone who's ever used GNOME or a GTK app. The splash screen, I also noticed, showed something besides fixed-width fonts for a change: Emacs has support for scaled, proportional fonts. One of the changes to Emacs 21, according to the News document that ships with it, is that it can now take advantage of X toolkits if present. It lists support for Lesstif/Motif as well as Lucid and Athena widgets (and Xaw3d). Consequently, the menubar and the tool bar look more finished. The program does not, however, use GTK at this time. With the right icons, though, it would be easy to make Emacs look quite a bit like a GNOME app, or, for that matter, a KDE app. The toolbar is the function of some very simple Lisp.
(define-key global-map [tool-bar shell]
'(menu-item "Shell" shell
:image (image :type xpm :file "~/gnome-term-linux.xpm")))
in my .emacs file, for instance, produced an icon on the toolbar
that invokes the Emacs shell buffer. Obviously, much more elaborate code
can be substituted to make it worth the user's while to remove her
hands from the keyboard long enough to click a button.
The addition of graphical cues extends to a few other areas of the software. The speedbar, for instance, now uses folder icons to denote directories instead of + and - symbols. Because of the raised look of the bars separating frames, it seems more likely people might try to "grab" them and resize them.
Looking A Little DeeperEmacs is, of course, a huge program. There are "Emacs people" out there who use a lot of it, and there are "lesser Emacs people" who have a few set tasks they perform. It's not possible to describe everything new and improved, if only because changes that may seem trivial to someone who never uses the features in question are likely profound to someone else. Consequently, this is just a look at a few of the changes a weekend turned up. There is one bit of "GNOME functionality" now added. The "browse-url-gnome-moz" option to "browse-url-browser-function" can be used to invoke the GNOME gnome-moz-remote program. GNOME users will be familiar with that as a tool to invoke a new browser window without launching an entirely new process. One of the nice things about it is that it's smart about your current running browser: Mozilla users don't get a new instance of Netscape Communicator to deal with when opening a URL with this function. Now it's tied into Emacs, which is handy for previewing HTML copy or opening URLs from a mail message. GNUS has earned a following not only as a good newsreader, but as a mail client and a back-end to several other 'net-based resources. A few new things have popped up. It now, for instance, has integrated MIME support. Combined with another new feature (the ability to display graphics in your Emacs window), it's possible for GNUS to show inline MIME attachments (pictures), and Emacs now also has sound support, making it possible to play .wav files from within Emacs. This new MIME functionality frees GNUS and Emacs in general from relying on external helper programs to display graphics. According to the documentation, Emacs supports PNG, XPM, TIF, JPEG, and a few other graphics formats, all of which are compile-time options. GNUS also has better multi-lingual support. If you receive a message written with Japanese characters, it prints Japanese characters. Finally, GNUS also now supports IMAP and some interesting new backends, such as Slashdot (which allows you to browse the site as if it's an NNTP feed) and support for some popular web-based mail services (such as HotMail and Yahoo!). There are also some changes in the way GNUS is configured. If, like me, you borrowed compulsively from others to get your GNUS configuration up and running, it's time to dust off .gnus.el and figure out what some of those statements mean--they've changed a few things. Just looking at the suggested configurations, though, they look more streamlined, allowing for much less configuration code to handle much more. Another new piece of streamlining is in how Emacs handles scroll wheels on mice so equipped. What used to take 12 lines of Lisp now works with the very simple command (mwheel-install) placed in your .emacs file. Font-locking, which is how Emacs provides color syntax highlighting, now supports multiple lines. Another feature long in coming to GNU Emacs was color support from tty's (text consoles.) While Emacs under X provided color syntax highlighting, Emacs from the console didn't. That's changed now, which makes using Emacs on an older machine that isn't quite up to X much more of a pleasure. In the "yet another reason to never leave" department, there's WoMan, the integrated man page reader, which does a nice job of formatting man pages and provides hyperlinks to man pages referenced by the word under the cursor. It takes a little while to get WoMan started, since it indexes your entire collection, but once loaded, it's a nice way to look up information. With something like procmail, which spans four manpages, hyperlinked help is handy. Configuring Emacs via its built-in configuration menu structure seems a little easier now, as well. There are graphical radio buttons for options, and the use of X toolkits makes it easier to immediately identify what's to be clicked.
Wrapping UpTwo-thousand lines into the NEWS file, things took a turn into what's changed about the Lisp that forms the core of Emacs and I realized I wasn't going to be keeping up. What's clear, though, is that Emacs has made an interesting move from a program that integrated into X only uneasily into one that provides some added functionality and features to make it a more comfortable fit. Given another week, a whole other slew of new features will likely present themselves for review, but it's clear that even with the small survey offered here, Emacs has evolved dramatically this time around. Many will, of course, grab this newest version when it's widely available and argue that the added graphical glitz is so much more bloat and that Emacs was fine without it. Others will decide to approach it because it seems less menacing with a more modern-looking toolkit and the cartoonish GNOME icons that packagers may choose to use with it, and then promptly back away because while, even with the new skin, learning it isn't the hardest thing in the world, getting used to it, especially for those coming from the world of 'edit' and 'wordpad' in Windows-land, can be daunting. Making it do what you want is an exercise in getting to know Google and visiting a lot of idiosyncratic web pages written by Emacs enthusiasts. In other words, Emacs is still Emacs. It's just gotten better.
|