Emacs Keybindings in OS X

I think I’ve mentioned this before but a recent post by Anton Nikishaev reminded me that this is useful information if you fall into the intersection of Emacs and OS X users. OS X has a very configurable keybinding facility that allows you to easily set keybindings that suit your workflow.

If you’re an Emacs user, you might want to use the same keybindings in the rest of the OS X applications. To do this, download this file and install it as ~/Library/KeyBindings/DefaultKeyBinding.dict and experience the joy of Emacs keybindings everywhere. The file is a text file and easily editable if you have your own notion of what the proper Emacs keybindings are.

I’ve had this installed for a long time and wouldn’t want to live without it. With it, I don’t have to learn a bunch of new bindings for each application. It’s Emacs all the way down.

Update: fixed link to the configuration file.

Posted in General | Tagged | 2 Comments

A VimGolf in Emacs Challenge

I’ve been obsessing and writing about the continuing NSA scandal and as a result we haven’t had any fun with VimGolf for a while. Just in case you’re as rusty as I am, here’s an easy one.

Starting with

one two
three

transform it to

(one) (two)
(three)

in the minimum number of keystrokes.

It’s easy to do this with a straightforward query-replace-regexp in 14 keystrokes, which is about the average for the VimGolfers. A slightly more clever use of query-replace-regexp gets the job done in 10, which is better than all but one of the VimGolf solutions.

Those are fairly pedestrian solutions but we can do better by leveraging some Emacs power. Using a macro in conjunction with paredit does it in 6. Unfortunately, the best VimGolf solution takes only 5. So it’s up to our Irreal experts to save the honor of Emacsers everywhere. Add your solutions to the comments and I will post mine in a few days.

Update: I forgot the give a link to the original VimGolf problem. Here it is. Also, I notice that the solution that solved it in 5 (7 according to VimGolf rules) has been removed. I don’t know what that means.

Vimgolf → VimGolf

Posted in General | Tagged | 13 Comments

Mega Mail

There is so much to love in this announcement. Kim Dotcom’s Mega.co.nz is going to offer secure, encrypted email and house the server out of the reach of the illegal snooping of the NSA. Not content to make the US DOJ look like the Keystone Kops after their trying unsuccessfully, and probably illegally, to extradite him and destroy his business, Dotcom is once against sticking his finger in the US government’s eye by working to replace the Lavabit and Silent Circle secure email services with one of his own.

Really, I don’t know what the government was thinking. By again overstepping, and in a climate which already sees a majority of Americans worried about their activities, the FBI/NSA provoked the two services to shutdown. This guaranteed two things:

  1. Someone would open a new service outside of US jurisdiction.
  2. Many Americans (and others) who haven’t previously used a secure email service will sign up.

Add to that the likelyhood that an already skittish Congress will be more inclined to bow to popular pressure and significantly rein them in and it’s pretty easy to conclude that they haven’t done themselves any favors.

Like everyone else, I don’t want some wackjob blowing me up but the Fourth Amendment is the law of the land and there’s no wackjob exception in it. I get tired of hearing about “balancing security and privacy.” The Fourth Amendment says what it says: you want to go snooping, show probable cause and get an individualized search warrant. No short cuts allowed no matter how much easier it makes the intelligence agencies’ jobs.

Update: Secure Circle → Silent Circle

Posted in General | Tagged | Leave a comment

A Bit More On Lavabit

Forbes has a bit more information on the closing of Lavabit. They provide additional clues that Ladar Levison of Lavabit was indeed asked to monitor users’ logins in order to capture their keys.

Among other things, we learn that Levison has complied with “two dozen” individual warrants in the 10 years that he has run Lavabit. He says explicitly that the reason he shut down Lavabit was not because of a request for a single user’s data but to protect all his users. That’s a bit ambiguous, I suppose, but a fair interpretation is that the government wanted him to do something that could potentially affect more than a single targeted user.

I’ll leave you with this quote from Levison explaining why he is stepping away from email:

If you knew what I know about email, you might not use it either.

Posted in General | Tagged | Leave a comment

A Lisp Bookshelf

Mozart Reina has a post up about his Lisp bookshelf. It’s a nice collection of books that anyone wanting to master Lisp should read. My favorite, SICP, is there as is Lisp in Small Pieces a book I very much want to read but not at $106.

If you’re looking for some books on Lisp, this is a good, representative list. Many are available for free on the Web so even if you’re a starving student or otherwise short of funds, you can get an excellent start on the road to Lisp. It’s a journey well worth taking.

Posted in General | Tagged , | 1 Comment

The Price of Integrity

Those of you who who follow Irreal daily know that I recently migrated the email that was going to my Gmail account to Lavabit. All of that mail was from technical mailing lists so it didn’t really matter much except as a statement of principle. Now Ladar Levison, the owner and operator of Lavabit, shows us what principle is really about.

Levison announced Thursday that for reasons he is legally barred from disclosing he is shutting down Lavabit. He says that it was a hard decision to walk away from 10 years work but that he could not be complicit in crimes against the American people. In as much as Lavabit has previously complied with specific warrants issued with reasonable probable cause, it seems a safe inference that he was being asked to provide a more wide-ranging access to users’ accounts.

Because of the way Lavabit works, this would mean either monitoring users’ logins to capture their passwords or making copies of emails before they were encrypted. Either of these would break faith with Lavabit’s users so Levison apparently felt he had no choice but to close his business. A business, let me say again, that he spent 10 years building.

Friday brought the news that Silent Circle was closing its email service as well. Silent Circle says that they weren’t approached by the government but that in light of Lavabit’s experience they felt it was likely and rather than put their users at risk they preemptively closed the service and destroyed the server it ran on.

Years of hard work and doubtlessly many jobs were lost with the two closings. All this so that no Americans could keep their emails private. Google, Microsoft, Apple, and the others who have willingly collaborated with this illegal government spying may not care but they should. The Technology and Innovation Foundation reported this week that US cloud computing companies could lose between $21 billion and $35 billion because of their ties to the NSA. As Edward Snowden remarked about the Lavabit closing,

The President, Congress, and the Courts have forgotten that the costs
of bad policy are always borne by ordinary citizens, and it is our job
to remind them that there are limits to what we will pay.

Perhaps it’s time for one of the big boys to take a lesson on integrity from Lavabit. Imagine what would happen, for example, if Google threatened to shut down Gmail.

Update: Those who you → Those of you who

Posted in General | Tagged | Leave a comment

No Exceptions

Personally, I think the only thing to do is to go back to the original
sense of the Fourth Amendment and say, no warrantless wiretapping, no
general warrants, no surveillance without specific probable cause, no
exceptions, ever. There shouldn’t even be something like FISA to allow
exceptions for special cases.

Commenter Petréa Mitchell in response to the excellent post by Bruce Schneier on how to restore trust in government after the NSA revelations.

Posted in General | Tagged | Leave a comment

Open Access: A Tipping Point

For some time now there’s been a movement within academia for open access to their research results. Many professors, especially those in Mathematics, have pledged not to publish in closed journals. The paid journals, of course, hate this and have been fighting the trend in any way possible including lobbying the government to make open access journals illegal. Some would say that the fight reached its inevitable conclusion with the Aaron Swartz affair (although JSTOR, to its credit, refused to participate in the prosecution). If you don’t know about the open access movement, let the incomparable Jorge Cham explain it to you.

Now, in what could well be a tipping point in the fight, The University of California has instituted an open access policy. The new policy requires that all research from all 10 campuses of the UC system be available to the public without charge via the campus Website eScholarship. You can read the UC announcement here. I’m confident that we’ll soon see other universities following suit.

That’s a good thing. Whatever you think about paid journals and their place in research, it’s hard to argue with the notion that when the public pays for research (as they do for most research) they should be able to see the results without paying exorbitant fees to a publisher.

Posted in General | Leave a comment

Elisp Namespaces

Nic Ferrier has posted an interesting proposal to bring namespaces to Emacs Lisp. His ideas seem both reasonable and doable. One of Elisp’s big problems is the lack of a namespace system. We end up with a bunch of nasty looking identifiers such as jcs/fill-buffer-with-zeros or jcs-make-new-entry to avoid identifier conflicts.

Ferrier’s proposal, which you should read, mostly avoids all that without doing much violence to existing code and packages. It’s worth discussing and I hope that the entire Emacs community will read it and contribute ideas and criticism. Having a decent namespace system would make all our lives easier and, at the same time, give Elisp detractors one less thing to complain about.

Posted in Programming | Tagged , | Leave a comment

An Emacs Timeline

Jamie Zawinski has an interesting old post on Emacs history. It’s a timeline of Emacs versions from Stallman’s, Moon’s, and Steele’s original merger of TECMAC and TMACS in 1976 to Gnu Emacs 22.1 and XEmacs 21.4.21 in 2007.

His original timeline was written in 1999 and then updated in 2007. I wish he would update it again, although the history since Emacs 22 probably isn’t that interesting. In any event, if you enjoy exploring the history of our field and Emacs in particular, you should give this post a look.

Posted in General | Tagged | 5 Comments