Org Attach Video

Over at the Emacs Elements Channel, there’s a new video on using Org mode attach. For those of you aren’t familiar with the attach facility, the idea is that you can attach one or more files to an org heading. The file is kept in a separate directory and linked to the Org heading. The files can, of course, be opened from the Org file to which they are attached.

For most users, the only complex part is deciding how to “attach” the file. You can do that by

  1. Making a copy of the file
  2. Moving the file to the attachment directory
  3. Linking to the file
  4. Attaching a symlink to the file

As the video explains, you can also set a default method if you always do it the same way.

One interesting thing that I didn’t know is that you have some control over where the file(s) is stored. By default it goes into a data subdirectory in the same directory as the Org file but you can arrange to have a single data directory for all attachments regardless of where the Org file resides.

I don’t use attach as much as I could because before I was aware of it, I set up my workflow to do essentially the same thing but use Org links directly. That means, among other things, that I can put those links in an org table, which is handy for, say, tax receipts. If I were starting now, I would probably make more use of the attach facility.

The video is 12 minutes, 27 seconds so you’ll probably need to schedule some time. If you’re not already familiar with attach, you should definitely spend the time to watch it. As a bonus, the video shows you a bit of Elisp that allows you to attach files from Dired and some code that displays the names of the stored more easily.

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