Fast Opening an Org Index File

I’ve written before about Karl Voit’s Memacs system. It’s basically a set of programs that collects all his daily data—phone calls, emails, photographs, texts, bank statements, git commits, and so on—stores it in Org files and then makes it available via links in his daily agenda. The data is stored in various places in his file system and can be moved if necessary. He locates the data indirectly with an Org based index file. The agenda link points to the index file that, in turn, points to the actual file. The index file is sort of like the Unix File Table for you Unix heads.

The system is so useful to Voit that he’s run into a problem. His index file is now how almost half a million entries and Org takes too long to load the file and locate the correct entry. He solved this problem, with some help from John Kitchin, by using grep to search the index file and follow the link in the appropriate entry to the desired file. All this is initiated by simply clicking on the agenda link. Take a look at his post for the details and also a bit more information on how the index file works.

Voit’s solution is interesting and probably applicable to similar situations but it’s a detail buried in Kitchin’s Elisp that is really the gold in the post for me. After the code locates the proper index entry, it places it in a temporary buffer and moves to the link to the target file by calling org-next-link. That function simply moves the point to the next Org link. If you use a lot of Org links like I do, you’ll find yourself doing this all the time. Usually I’d just manually move the point with the usual motion keys. But with org-next-link, which is bound to Ctrl+c Ctrl+x Ctrl+n, I can move directly to the link. It’s very handy and I’m already addicted.

UPDATE [2017-01-07 Sat 10:56]: memecs → memacs in link.

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