Emacs Config

Emacs Markdown Indentation

Emacs on the iPad

The iPad Pro has more people considering using the iPad for production, not just for entertainment. I have long been jealous of those who could use an iPad for most of their work, especially now, as iPad displays get bigger and nicer. I would love to be able to throw an iPad and keyboard into a small bag and be able to use the same tool for both reading and writing.

LaTeX-Skim Sync

I recently started using John Wiegley’s use-package for my Emacs init files. For Auctex, I used (use-package tex :ensure auctex) and everything worked except for sync with Skim on OS X. C-c v would not launch the Skim, even though I was confident that the Skim was set to be the default viewer. Instead, no viewer would launch, and I’d see “View command: dvi2tty -q -w 132” in the minibuffer.

Using Marked with Emacs

It’s time to revisit a subject I covered in 2014, using Emacs to open a Markdown file in Marked, an excellent Markdown previewer for OS X.1 I have used two different methods of opening files in Marked from Emacs, both of which have respective advantages. The first is a function expressly for opening files in Marked. Add the following code to your emacs init file, and then press “Control-c m” to open the current file in Marked.

Open Dired From Shell

I was browsing the interwebs this morning, looking for a way to open a Dired buffer of the current finder window. There is a lot on going the other way, from Emacs to the Finder, but nothing from the Finder to Emacs. I got this from Fortune Datko: Add this to your shell rc file (in my case, .zshrc):

open a dired window for the current directory dired() { emacsclient -e "(dired "$PWD")" } Then, assuming that Emacs server is running, type “dired” in the shell, and a Dired buffer of that directory opens in the current Emacs frame.

Emacs on OS X

Homebrew I install Emacs with Homebrew. After installing Homebrew, just type the following in Terminal: brew install emacs –cocoa This makes upgrading very easy, brew upgrade updates everything that you’ve installed in Homebrew. It also keeps things nicely organized in /usr/local/Cellar/ and puts symbolic links in /usr/local/bin/. After installation, you have two options for getting Emacs into your Applications directory. First, Homebrew can put a link there with brew linkapps Emacs.

Stringp, Nil Error in Emacs

This is one of those posts that serve only to remind me of something in the future. My Emacs configuration was working well on one machine. Whenever I opened dired on another machine, though, this error was returned: wrong type argument: stringp, nil Finally, I remembered that I had required GNU ls in my Emacs settings, and had not installed it on the machine in question. A quick “brew install coreutils” to install the GNU Command Line Tools with Homebrew did the trick.

Back to Emacs Prelude

As I said a few days ago, I switch my Emacs config files to Kieran Healy’s Starter Kit. I really liked the use of Org-mode for the config, and especially the LaTeX and RefTeX configuration. I still like Batsov’s Prelude, though, and there were certainly some things that I missed greatly. This afternoon, I found Mike McFarland’s Emacs configuration online. He uses Prelude with a personal configuration in Org-mode. I have switched back, and brought in much of Kieran’s LaTeX configuration.

Emacs Starter Kit

The first week of a break from classes is always a good time for a massive reconfiguration of something tech-related. Last time it was the blog, this time it is Emacs. Since I primarily use Emacs only for LaTeX and Markdown editing, I though I would give Kieran Healy’s Emacs Starter Kit for the Social Sciences a try. He has done a masterful job of setting up a great LaTeX editing machine.