September 24, 2018

Use Siri Shortcuts for org-capture

If you’re like me and you use the fantastic org-mode and its agenda capibilities to keep track of the things you need to do, you might also be thrilled about the new Shortcuts app, which came along iOS 12. Shortcuts lets you create pretty powerful workflows to save you from performing the same repetitive task over and over again. Think about creating a simple ToDo item in your ToDo list. If you use an app like Apple’s own Notes or Reminders app, or a third party app like Clear, Wunderlist etc. this task is a no-brainer. If you use org-mode however, there is no quick way to add a new item to your list.

The basic workflow to do it might be something like this (assuming you use Dropbox where you keep all your .org files):

  1. Open the Dropbox app
  2. Go to your file where you store incoming tasks (let’s say it’s in /org/inbox.org)
  3. Open the file, edit it, and add a new line, e.g. * TODO I gotta do this

If you had to do this every time you wanted add a new item on your to do list, you’d probably go insane after the 4th item. So the solution so far for me was to just wait until I’m on my Mac again.

Siri shortcuts to the rescue

With Shortcuts I am now able to use org-capture from anywhere on my iPhone. I only needed to replicate the the steps above in the Shortcuts app and now adding a item to my list is as simple as hitting my newly created widget.

A note on iCloud Drive

Before Dropbox, I used iCloud to keep all of my Org files in sync. However, there was a bug when I tried this workflow with iCloud: If the file inbox.org is not yet created in iCloudDrive the file will be created before writing the first ToDo item to it, which is good. Unfortunately, when I added the next item, instead of appending a new line to inbox.org the line was appended to a new file named inbox.org~2. This bug did not occur when using a .txt extension instead of .org and it did not occur with Dropbox at all. I hope this will get fixed in the future.