elisp

The magic of defadvice

I recently did some house-cleaning on my emacs configuration. What used to be a huge mess of git submodules and manually added files is now very neatly managed with the help of Cask and Pallet. But that’s not what this post is about. While cleaning up all the emacs packages that I’ve accumulated over the past three years, I realized that I’d installed Helm with the express intention of fiddling around with it, but had never actually gotten around to doing so.

Elisp code for easily creating a new blog post

Another reason why I’ve been keeping off blogging is because each post needs to be in a certain format for poet to accept it. Here’s what this post looks like so far at my end: { { { "title": "Elisp code for easily creating a new blog post", "date": "11-17-2013", "time": "23:38:53", "tags": ["emacs", "elisp", "poet"] } } } Another reason why I've been keeping off blogging is because each post needs to be in a certain format for [poet](https://github.

Making an asynchronous plugin for Emacs

With the libclang functionality working reasonably well as a python module, it was time to move on to getting it to work with Emacs. Naturally, my first instinct was to simply use Pymacs to interface with Python and then figure out a way of making it asynchronous. So I spent a couple of hours and made a functioning version with Pymacs, and then explored my options for making it asynchronous. Two solutions stood out:

Converting relative paths to absolute ones correctly

Just a quick post about an annoying quirk that Emacs has and a way around it. Similar to most interpreted languages (well, similar to python anyway, which is the other place where I recently faced this problem) elisp doesn’t really treat relative paths the way one might expect it to. Instinctively, I expect a relative path specified in a script to be relative to that script under all circumstances. However, in elisp and python both, the path is consistently relative to the CWD of the executing code.