Miskatonic University Press

Recent Emacs changes

code4lib emacs

I’ve tweaked my Emacs setup a few times recently.

First, I changed how Org bullets look. I use the org-bullets package—it’s very nice—and had it showing bullets and circles of various sizes for the different heading levels, but a few weeks ago something broke for a little while and I wasn’t seeing any bullets on any headings. Do you know, it looked nice. Very simple and clean. When the problem was fixed I tried it for real, but I need some kind of visual indicator of where I am, so I changed the bullets for the top three headings and use nothing for the fourth. This is what Org looks like for me now:

Org bullets.
Org bullets.

The top heading is “⊢,” which is a turnstile or RIGHT TACK in Unicode.

It flows nicely as an outline:

Org bullets outline.
Org bullets outline.

Second, I started using Projectile. It’s very nice for working on projects and bouncing around files in one project, and it does a great job of understanding what a project is. C-c p p lets me switch to a project (usually something under version control, but it doesn’t have to be), and then C-c p f finds a file in that project or C-c p b bounces to an open buffer from that project.

Third, I started using Ivy, Swiper and Counsel for command completion and browsing search results. For some reason I had to run M-x package-refresh and M-x package-install RET ivy to get Ivy to go in; perhaps that’s a transient problem. Aside from that it was all seamless and it’s giving me great improvements on searching for words (with C-s), using ag to search files, searching the Unicode table to find a particular character, and so on. It’ll take me a while to learn everything it can do, but out of the box it’s an improvement right away.

Here’s what a search for “zotero” (C-s zotero) looked like while editing a this file a few minutes ago. The matches are highlighted on screen because I use the highlight package, but they’re also there for my choosing in the minibuffer at the bottom thanks to Swiper. It can also show me results from multiple files, and jumping to the line I want is easy.

'C-s zotero' in this buffer: nice results at bottom.
'C-s zotero' in this buffer: nice results at bottom.

Fourth, I’m using the zotxt extension in Firefox so Emacs can talk to Zotero with the zotxt package. Michael Behr wrote this up in A research workflow with Zotero and Org mode and I was very happy to see it, because it does just what I need: inserting citations from Zotero into Org buffers. I keep notes on papers I read, and this does the trick. I’ll go to org-ref (John Kitchin’s work with Org is remarkable) if I need to, but Zotero is my research management tool, and I want to talk to it directly, without exporting BibTeX files from it as a middle step.