Emacs 24.3

By now you all probably know that Emacs 24.3 is out. This is a substantial release with lots of new goodies. I could write a long blog post about them but fortunately Mickey has has already done the work so I can be lazy.

As usual there was no problem compiling and installing Emacs. For OS X it’s just

./configure --with-ns
make install
cp -R nextstep/Emacs.app /Applications

If you’re on a different platform, just follow the directions in the INSTALL file.

This time I did have configuration problems. The first thing that happened was that Emacs couldn’t activate org2blog during initialization because it couldn’t find org. Of course, org was there but it wasn’t being managed by ELPA so I set it to be loaded by ELPA. That didn’t bother me because I’d been meaning to move the rest of my packages over to ELPA anyway. After that, everything loaded without problem. I started happily writing this post but when I went to insert the above link to Mickey, I got an error complaining that org-no-popups was not a valid function. After a little investigation I discovered that the Org folks are recommending against loading org with ELPA because of this error—they claim it’s a problem with ELPA. Now I was back to org2blog not loading. I moved that out of ELPA too and everything starting working fine.

I’d rather have everything in ELPA but I can live with the current situation. At least everything is working again. The takeaway is that if you’re an Org user (and are loading the latest version rather than the builtin) you may want to move it out of ELPA.

Once I got past the initialization problems, everything ran fine. As I said, this is a substantial release so it’s worth getting it installed as soon as you can find the time.

Posted in General | Tagged | Leave a comment

Help From Phil

Regular reader Phil offers some help on help in the comments to the vc-annotate post. The first suggestion is something I think he’s mentioned before but that I promptly forgot. I often want to look at the source code that implements an Emacs command. Sometimes it’s just curiosity, other times I want to extend or modify the command or implement something similar. My normal procedure for this is to bring up the help page for the command with 【Ctrl+h f】 and then click on the link to the source code. Actually, there’s a function that does that for you: find-function. Phil assigns the key sequence 【Ctrl+h Ctrl+f】 for this. I do this operation often enough that this is a real time saver for me and I’ve added it to my init.el.

The second two commands are built in but virtually unknown. The sequence 【Ctrl+h F】 is just like 【Ctrl+h f】 except that it brings up the info page for the command. Similarly 【Ctrl+h K】 brings up the info page given the key sequence for the command.

These are really useful things to know so we all owe Phil thanks for (once again) pointing them out. Maybe now that I’ve blogged about them I’ll actually remember them.

Posted in General | Tagged | 1 Comment

Git as a Function Data Structure

Philip Nilsson over at Jayway has an illuminating post about git. His idea is that git is best understood as a purely functional immutable data structure (like a CL list). That probably doesn’t seem very promising but he makes a good case and the approach does reveal the essential things you have to understand about git.

The post is well written and starts with a quick explanation of what he means by “purely functional” so even if you’re not a Lisper it will all make sense. I won’t step on Nilsson’s post by reiterating the details here so you’ll have to go on over to see them. Don’t worry, it’s worth the trip.

Posted in General | Tagged | Leave a comment

More on Quickdocs

Recently I mentioned the Quicklisp indexing site Quickdocs. Since then, Fukamachi has continued to improve the site. He’s added categories so that you can browse the list of all libraries concerned with, say, Graphics. That gives you an idea of what’s available and, of course, you can drill down into any package that looks promising.

The site is generated automatically whenever a new Quicklisp distribution is released so it’s always up to date. This is promising to be a really great resource. If you haven’t taken a look at it yet or haven’t seen it since it was upgraded, it’s well worth your while to pay it a visit.

Posted in General | Tagged , | Leave a comment

Emacs: The Portable Development Environment

Yesterday, I wrote about the video chat between Sacha Chua and Avdi Grimm. The take away from that post was vc-annotate, a powerful Emacs tool that hooks into your version control’s annotation facility. Right at the end of the chat—about 42:25—Grimm makes another important point that we’ve discussed here at Irreal many times.

He says that the real power of Emacs is that it’s not just an editor but a Lisp Machine. What makes that important is that we can write our own development environment and take it with us wherever we go: it’s portable. Portable across projects, machines, and operating systems. That’s because it all lives in the Emacs Lisp Machine. Most of us, of course, don’t sit down and write a complete development environment before we start actually developing. Rather, we add small tools, shortcuts, and hacks to the stock Emacs distribution as we encounters pain points.

After a few years of that, we end up with a highly customized environment specifically suited to our work flow. This becomes so important that it would be painful to have to abandon it upon moving to another project or platform. The nice thing with Emacs is that we don’t have to. It’s all part of Emacs and our individual .emacs or init.el files.

The logical consequence of this is that many of us reach a state where we hate to leave Emacs and move as much of our environment as possible into it. You know you’ve reached that point when you find that you’re trying to convince yourself that, really, W3M is almost as good as Safari/Chrome/FireFox or whatever. We mostly don’t believe that but it makes us grumpy that we can’t run a browser inside Emacs the way we do a shell.

Posted in General | Tagged | 2 Comments

vc-annotate

The Internet’s tireless blogger Sacha Chua has another interesting video chat about Emacs. This time it’s with Avdi Grimm, a well-known Ruby guru and Emacs user. The video is informative and definitely worth 40 minutes of your time so give it a look when you get a chance.

Towards the end, Grimm talks a little about how many developers use all sorts of suboptimal strategies for learning about the history of a piece of code. Many switch to a terminal and interrogate their version control system. Some go to github and browse the history there. Some even comment out old code so that the history is always there in the file. As Grimm points out, none of that is necessary if you’re using Emacs or other decent programmer’s editor. In the case of Emacs, you need merely invoke vc-annotate and a color coded history of the file is displayed along with the commit id, committer, date, and other information. From there you can drill down and get further details. Grimm has an excellent short video1 that demonstrates some of its functionality.

The nice thing is that vc-annotate is in stock Emacs so you don’t need to do anything to use it. Just bring up a file that’s under version control and type【Meta+xvc-annotate or 【Ctrl+x v g】 to try it out. You can read about vc-annotate in the Emacs manual or under the Old Revisions node in Info. This is a great feature; I can’t believe I didn’t know about it.

Footnotes:

1 The video doesn’t show up at all without Flash so if you don’t see the video at the link, you’ll need to view it with Chrome or some other browser with Flash installed.

Posted in General | Tagged | 5 Comments

Emacs 24.3 Release Candidate 1

Emacs 24.3 Release Candidate 1 is available for FTP download. If all goes well, the developers expect to release 24.3 in about a week. Consider jumping in to help with the final testing if you can.

Posted in General | Tagged | Leave a comment

The Emacs Logo

After all the heavy breathing about Emacs UI issues recently, here’s a softer, gentler Irreal take on Emacs bling. If, like almost everybody, you’re invoking Emacs from some sort of GUI you’ve undoubtedly seen the Emacs logo. I’ve pretty much never given it a second thought but that was wrong.

The Emacs logo, and others like it, don’t just happen. Someone has do design and draw it. Here’s a very nice history of the current logo and how it was developed. What strikes me is how, at the same time, it was both instantaneous and drawn out. On the one hand, Luis Fernandes could draw trial logos in just a few seconds but it took a very long time to settle on a final design and get everyone to sign off on it.

The above link is a very nice history of the design of our current logo and should give you an appreciation for a part of Emacs development that most of us never think about. Well worth a few minutes of your time.

Posted in General | Tagged | Leave a comment

A Full Screen Eshell

Almost all of my tube time is spent in 4 programs: Emacs; Safari; Reeder; and Mail, roughly in that order. Naturally, I try to stay in Emacs as much as I can. In particular, I’ve long bound 【Ctrl+c s】 to start a bash shell in an Emacs buffer.

Recently, I came across this post and video by Eric Himmelreich on ways he makes Emacs fit his workflow. He demonstrates two things. First, he has a function that splits his Emacs frame into two side-by-side windows of 80 characters each and makes the frame take up all available screen height. I do much the same thing except that the window configuration is performed by a system-specific initialization file.

The second thing is more interesting. He likes to have a full screen terminal running that he can bring up when he needs it. He decided to integrate that into Emacs by writing a keyboard macro to start a full screen eshell and another to restore the previous window configuration. That seemed pretty useful to me and after playing around with eshell a bit, I decided I liked it better than running bash so I decided to implement something similar to what Himmelreich did.

Rather than use keyboard macros, as he did, I stole the idea behind Magnar Sveen’s excellent magit-status hack. The idea is simple: typing 【Hyper+e】 saves the current window configuration, starts eshell, and deletes the other windows. A subsequent 【Hyper+e】 restores the window configuration. The code is simple

(global-set-key (kbd "H-e")
                (lambda ()
                  "Bring up a full-screen eshell or restore previous config."
                  (interactive)
                  (if (string= "eshell-mode" major-mode)
                      (jump-to-register :eshell-fullscreen)
                    (progn
                      (window-configuration-to-register :eshell-fullscreen)
                      (eshell)
                      (delete-other-windows)))))
Posted in Programming | Tagged , | 3 Comments

Pallet

I just saw a reference to Pallet on reddit. It’s a way of syncing your Emacs packages across several machines. For example, you might, like me, have several machines and want your ELPA configuration to look the same on all of them. The usual strategy of throwing everything in git or some other version control can cause merge conflicts and other problems. Pallet is supposed to handle the syncing in a more efficient way.

It looks pretty nice but judging from the comments it’s very new and no one commenting on reddit had any experience with it. Does anyone here have wisdom to share about it?

Posted in General | Tagged | 5 Comments