Emacs 23

Emacs 23 has been released. You can download it from GNU's FTP server.

The most notable new features or changes that I noticed or have been using:

  • A single Emacs process can generate frames on any number of TTYs and on X simultaneously. Run M-x server-start and then emacsclient -t or emacsclient -c to create a new TTY or X frame, respectively.
  • C-p and C-n now move by screen/visual lines instead of by logical lines. While this makes Emacs more consistent with most modern apps, it has the potential to break keyboard macros. If you use macros frequently, consider setting (setq line-move-visual nil) to disable this behavior.
  • Transient Mark mode is enabled by default. I find t-m-m is occasionally really handy, especially after the mark-* commands, and for restricting the region for query-replace. However, I think t-m-m highlights a little too aggressively. To disable t-m-m except after the mark-* commands, I use the following:
  • (transient-mark-mode 0)
    ;; Activate t-m-m only after mark-* commands (you can also enable it manually
    ;; at any time with C-u C-x C-x).
    (require 'cl)
        ((advise (&rest commands)
                    ,@(mapcar (lambda (command)
                                `(defadvice ,command (after transient-mark activate)
                                   "Activate Transient Mark mode temporarily."
                                   (setq transient-mark-mode '(only))))
      (advise mark-sexp
  • C-l is bound to recenter-top-bottom, which moves the viewable area so that the current line is at the center, top, or bottom on successive presses. Useful for surveying the area around point.
  • DocView mode, new, is a PDF/PostScript/DVI viewer.
  • Emacs is smarter about splitting windows (e.g. after C-x 4 C-f), splitting vertically if your frame is sufficiently wide.
  • Beautiful anti-aliased fonts.

There are many, many, more changes. See etc/NEWS for the gory details.

On emacs-devel, I recently got a pointer to Richard Stallman's 1981 paper on the design of Emacs, presented at the ACM Conference on Text Processing:

Extensibility means that the user can add new editing commands or change old ones to fit his editing needs, while he is editing. EMACS is written in a modular fashion, composed of many separate and independent functions. The user extends EMACS by adding or replacing functions, writing their definitions in the same language that was used to write the original EMACS system. We will explain below why this is the only method of extension which is practical in use: others are theoretically equally good but discourage use, or discourage nontrivial use.

Extensibility makes EMACS more flexible than any other editor. Users are not limited by the decisions made by the EMACS implementors. What we decide is not worth while to add, the user can provide for himself. He can just as easily provide his own alternative to a feature if he does not like the way it works in the standard system.

It is striking how so little software today, even "professional" software that users are apt to use 8 hours a day, is actually designed to facilitate extensibility and automation by users.

Zeya: bring your music anywhere

I love SSH. One reason is that I love being able to get to my files from anywhere on the planet without any advance planning.

After using SSH for a while, carrying my bits around with me on magnetized platters or EEPROMs inside a laptop/phone/PMP just seems so quaint and irritating. It leads to a host of problems: you have to worry about synchronizing, deciding what to synchronize, merging changes, and misplacing your device. Usually, some bizarre cable is involved in transferring data. And invariably, there's that one spreadsheet, paper, song, or ebook that you tragically can't view because you left it on your computer at home.

(Incidentally, I think using cloud hosted storage/apps is one approach, but not a complete solution, at least yet.)

Introducing Zeya

While SSH is great for the vast majority of application classes, I think effectively accessing audio/video remotely requires more specialized tools.

To this end, I spent a few days writing Zeya, a music server that takes your Rhythmbox music collection and streams songs from it to you. However, unlike gnump3d or ampache, Zeya presents a full music player right in your web browser, using the goodness of HTML 5. No Flash, no Silverlight, no Java applets, no plugins, no popups, no invoking external players, no client-side software installation.

Zeya brings your music to any computer with a web browser (OK, as long as the browser is Firefox 3.5, for the moment). Play songs from your collection on your desktop at work. Or on your netbook at Starbucks. And now or soon, when you get a current-gen web browser on your phone/MID/fridge, you can bring all your music there too.

Picture iTunes' library sharing. Now imagine that its functionality wasn't crippled to lock users in to iTunes. Oh, and you could actually access it from outside your LAN. Oh, and that you could listen from any computer, anywhere, without installing any software. I think Zeya in its current state is just a pale shadow of what is really possible when you actually try to make information really easy, rather than just marginally less difficult, to get to.

Samson Yeung and I have been working on, and using, Zeya for a few days now. It's pretty useful and easy to get running, but it is feature-bare, experimental, and subject to change in all sorts of fun and interesting ways. If that doesn't scare you, visit


try it out, and let me know what you think.

Why I can't afford proprietary software

The following happened at the lab a few months ago:

Date: Fri, 12 Dec 2008 12:16:52 -0500
To: matlab-users

Hi All,

Seems we've exceeded our pool of Matlab licenses.  We will be getting
more but unfortunately it takes 5-10 days to do so.

In the mean time please don't take up any more licenses than you
absolutely need and close instances you are not using.  We have some
people with tight paper deadlines that are unable to get licenses.

Thanks for your cooperation in this.

Just like that, for a handful of people, research work slowed to a crawl for almost a week at the end of the semester.

This kind of stuff makes my blood boil. There is no logical reason we have to ration software as if it were gasoline. But that's another rant. Enforcing unfortunate license restrictions is completely within The Mathworks' rights under the law.

I bring this up because I think it hints at the elephant in the room, namely:

When you use proprietary software on your computer, it's not your computer anymore.

That's the reason I'll talk my head off about free software and the reason I'm not going to stand for Matlab, Windows, Mac OS, Microsoft Office, the iPhone, , the Kindle, Flash, Skype, etc.— none of it. (Mathematica is a jaw-dropping technical achievement. And I still won't touch it with a ten-foot pole.) The moral of the story is not that you should double-check your Matlab license paperwork. No, this is par for the course, and just a symptom of the real problem: that proprietary software companies can enforce totally capricious and arbitrary restrictions on what we can and can't do with our computers, and that they have a well-documented history of doing so. So the less we have to rely on them, the better.

I am always a bit incredulous when people advocate proprietary software on the basis of things like ease of use or good design or shininess or intuitiveness or speed or usability or "it just works" or architectural superiority or elegance. It's not that I don't value those things. I'm an engineer myself, so I appreciate the effort that goes into making things work and work well. But what good is speed if you can't go anywhere? What good is usability if you can't fucking use your software? If you don't have two shreds of basic personal autonomy, worrying about other things seems kind of superfluous, no?

(It's just galling how most proprietary software has awful usability, but that's also another rant.)

You are probably skeptical, and rightfully so, about the true magnitude of the problem I'm complaining about here. This is not just an issue with a few bad apples (as it were...). It's a fundamental problem of incentives. When you pay for a license for bits, the vendor has an incentive to protect future sales by curtailing the possible uses of those bits. They certainly have the power to enforce whatever restrictions they wish and to change them up at any time. And they'll put time and effort into it, because you can't remove, inspect, or enumerate those restrictions. Maybe you think things are not so bad now, and indeed, maybe they aren't. But the rules can change arbitrarily and at any time, and I mean arbitrarily and at any time. (Three words: iPhone app store.) In the world of proprietary software, there are no sure things.

To put it succinctly, if you don't have the four freedoms, the people who make your software have the means, the motive, and the opportunity to cripple their products to extract as much money from you as they can. There is something deeply perverse and broken about this kind of business model. Remember the lesson from game theory: trust people when, and only when, it's in their best interest to help you.

It's not that I can't afford to pay for nice things. (What's $29, or even $1399, if it helps you get your job done? A bargain!) What I can't afford is paying for the privilege of letting someone have me by the throat (or elsewhere).