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

Enough Already

Over at the Emacs subreddit, MoreHugs is gnashing his teeth and beating his brow over the fact that the Emacs UI is not pretty enough for some users and thus inhibits uptake. Why, he wonders, can’t Emacs have a nice modern UI like Light-Table or SublimeText 2? Really, this is almost as annoying as the non-Lispers complaining about all those parentheses.

I love Emacs and don’t understand why everyone doesn’t use it but, as I’ve said before, the choice of an editor is a personal matter and no one else’s business. That said, if your reason for not using Emacs is that the UI isn’t pretty enough then as far as I’m concerned you’re not a serious person and we have nothing more to discuss1.

Use Emacs or don’t use it. Use whatever editor makes you happy and productive but for goodness sake, make your choice on something more important than how “pretty” the UI looks. People who do that are the same type of people who would choose a nice looking sports car for working the farm.

Vivek Haldar, who’s thought about these matters in some depth, put it best:

What I don’t understand is: why should you ever care how your editor
looks, unless you’re trying to win a screenshot competition? The
primary factor in looking good should be the choice of a good font at
a comfortable size, and a syntax coloring theme that you like.

I use Emacs because it gives me power—including the power to add missing functionality to make my life easier. I don’t care about tabbed displays, menus, or fancy buttons. And I certainly don’t care about a pretty interface. It’s a text editor for crying out loud.

Update: Added link to original reddit post.

Footnotes:

1 Strong words? They’re not nearly as intemperate as what I originally wrote.

Posted in General | Tagged | 5 Comments

SBCL 1.1.5 Is Out

I know I just wrote about SBCL 1.1.4 but that was because I somehow missed its release notice. This month I’m doing better and writing about SBCL 1.1.5 closer to when it was actually released.

As usual, compilation and installation went without a hitch. Besides the usual bug fixes, there a bunch of enhancements (see release notes for details) and a couple of new features, including package local nicknames. SBCL just keeps getting better and better. As I’ve said before, if you’re a Lisper you really should check it out.

Posted in Programming | Tagged , | Leave a comment

Remarks on EmacsGolf 2

There were a lot of good solutions to this challenge. I thought the interesting part would be switching the character entries in the table. If you are just before the first character pair vector, you can do that in 5 keystrokes with

F3 start keyboard macro
Meta+f forward to just after A
Meta+t switch characters
Meta+0 for the whole table…
F4 …execute the macro

It turns out, however, that the rest of the problem—what I thought of as “grunt work”—has some lessons to teach us too. Fuco has a nice trick for transposing “latin” and “gothic”: he makes use of the fact that a 0 argument to transpose words will transpose the words at or after the point and mark. I vaguely knew that but had never seen it used. Fuco also has a solution using multiple-cursors that solves the challenge in 22 keystrokes. In both solutions he makes use of his smartparens package. I’m not currently using it but it looks pretty nice so I’m going to look into it a bit more.

Jorge has a very nice solution in 21 keystrokes. Phil refines that a bit and gets it down to 17.

Xah Lee has a solution using query-replace-regexp that gets it done in 18 keystrokes using some of the customizations to his .emacs file.

Lee has sent me another proposed challenge, which I’ll post in a bit, but we shouldn’t make him do all the work or have all the fun. If you enjoy working on EmacsGolf challenges, please send your own challenges to challenges at the domain of this blog.

Posted in General | Tagged | Leave a comment