Winter Emacs Hacking

During our Spring Break equivalent earlier this year, I set aside a fairly substantial amount of time to hack away at making the perfect Emacs setup (for me, anyway). It was incredibly relaxing to just spend a few hours digging in and not feeling the stress that comes from know I have better things to spend my time on. Since there’s always more hacking to do, I figure this is going to be a pretty good tradition for me. Here’s how the tradition almost died and then came back to life.

Nightmare in Emacs Land

        My Emacs activity has died down a lot since I got my new laptop. Why? Well… I went a bit too wild setting up Emacs on it. I literally installed every interesting-looking package available from ELPA, MELPA, and Marmalade. That’s a whole lot of packages. Not so much to use them all immediately - it was just to keep up with their development. When I restarted Emacs to try a few, disaster struck: I was greeted with a stack trace full of gibberish to the tune of “debugger entered: symbol nil” or some such nonsense. At any rate, the part that normally says “here is where something went wrong” was nil, (), etc. followed by a lot of garbage.

        Things mostly worked, though, or at least half worked. For instance, I keep files across sessions using dekstop.el - only some files would be kept. I had previously opened an elisp file that contained comments written in Japanese - Emacs decided that must mean I want to use Japanese character encoding for everything, forever. It forgot how to write proper line-ending characters, and when I would re-open a text file I’d been working on, there’d be control characters everywhere. I’m sure other things were broken and I just didn’t notice, but this was all incredibly annoying.

        So I hadn’t been using Emacs a whole lot, which is fine since I’m not in programming courses anymore. IDLE works well enough for my work at the lab. In the meantime, I’ve continued squirrelling things away in Springpad to look at in the future (up to 329 items right now). The biggest new source for these has been, strangely enough, a subreddit dedicated to Emacs. I’m not much for reddit, normally, because it’s the kind of place where you can waste a whole lot of time. This is exactly what happens every time I visit r/emacs, so it’s both a blessing and a curse. It’s sort of intimidating to have hundreds of things to look at, but it’s all interesting stuff and it’s all working towards having a configuration I can use for years to come. But, of course, that presumes I’m actually making use of this configuration.

Return to Emacs Land

        But that debugger thing was a real pain in the butt. I had no real way to start investigating it, since it didn’t give any hint as to what was causing it. I was considering starting over and adding packages one by one, to see where the problem was coming from. That would have been miserable and time-consuming, but it would be appropriate penance for an incorrigible customizer.

        On a whim, though, I thought I’d try something today: update all my installed packages. I was worried that maybe the problem wasn’t me - maybe the newest Windows build of Emacs 24.2 was messed up. Or maybe some old package I was using had finally crapped out. If it was really a package I’d installed, and not a complex interaction between multiple packages, it would be simple to fix. So after a few months of anxiety I set 45 packages to update and went to have dinner. Maybe the problem had been fixed already.

        I came back, restarted Emacs… No debugger! All my files from the last time I used a healthy Emacs were back! File encodings were back to normal! Now I can finally start hacking again, maybe figure out how to use el-get on Windows to install golden-ratio.el

Emacs Mass Attack

        If you’re curious (and I know you aren’t, you can skip the rest of this) here’s the sorts of things I’ve got planned at a bare minimum.

        You might be wondering: why do I care about elisp libraries, since I’m not a developer? If these sorts of things take off, it makes things better for everyone, because elisp packages can incorporate reliable components that implement useful functionality. Feels good to make predictions that come true.

PS: Today’s section titles come to you courtesy of Kirby, because I couldn’t come up with any way to organize this around the titles of Star Wars movies