Using Org Capture Globally

After my recent disaster with my old MacBook Pro, one of the functionalities that I still haven’t restored is the ability to call Org capture from outside Emacs. I used to have a bit of Apple Script that I could call to do that but it was sometimes flaky so I was inspired to find something better with my new setup. This is especially important to my workflow because I use it all the time to capture links to Web pages and store them into my blog queue.

The most promising approach seemed to be using org-protocol. I found two excellent, recent blog posts that describe using org-protocol for capturing from other apps. Just what I wanted. The first, by mistan, described how to set things up in Linux. The other, by Christian Tietze, discussed the same thing under MacOS.

Using Tietze’s post as a guide, I configured org-protocol and tried calling org-capture from the terminal. I called my TODO template, like Tietze did, and it worked perfectly but I couldn’t figure out how to get the Org Capture menu, which my workflow needs as there are multiple templates that I need to call and I didn’t want to use different calls for each one.

Then I remembered writing about the methods used by Karlicoss to capture data from many different sorts of applications. The crux of his method is a script that does most of the heavy lifting and then a series of other scripts that call that one. I shamelessly stole his script, made some changes for MacOS, and called it from a script named call-org-capture. That worked perfectly. I can bind the call to call-org-capture to a convenient hot key and the problem is solved.

If you’re looking for a general way of calling Org Capture from other applications, I can recommend this approach. It’s working very well for me.

This entry was posted in General and tagged , . Bookmark the permalink.