There are a couple of options for attachments that are worth mentioning.
The directory where attachments are stored when ‘
ID’ is used as method.
When setting the ‘
DIR’ property on a node using
C-c C-a s (
org-attach-set-directory), absolute links are entered by default. This option changes that to relative links.
By default folders attached to an outline node are inherited from parents according to
org-use-property-inheritance. If one instead want to set inheritance specifically for Org attach that can be done using
org-attach-use-inheritance. Inheriting documents through the node hierarchy makes a lot of sense in most cases. Especially when using attachment links (see Attachment links). The following example shows one use case for attachment inheritance:
* Chapter A ...
:DIR: Chapter A/
#+NAME: Image 1
Without inheritance one would not be able to resolve the link to ‘
image 1.jpg’, since the link is inside a sub-heading to ‘
Inheritance works the same way for both ‘
ID’ and ‘
DIR’ property. If both properties are defined on the same headline then ‘
DIR’ takes precedence. This is also true if inheritance is enabled. If ‘
DIR’ is inherited from a parent node in the outline, that property still takes precedence over an ‘
ID’ property defined on the node itself.
When attaching files using the dispatcher
C-c C-a it defaults to copying files. The behavior can be changed by customizing
org-attach-method. Options are Copy, Move/Rename, Hard link or Symbolic link.
This customization lets you choose the default way to attach to nodes without existing ‘
ID’ and ‘
DIR’ property. It defaults to
id but can also be set to
Configure this to determine if attachments should be deleted or not when a subtree that has attachments is archived.
When attaching files to a heading it will be assigned a tag according to what is set here.
ID’ is used for attachments, the ID is parsed into a part of a directory-path. See
org-attach-id-uuid-folder-format for the default function. Define a new one and add it as first element in
org-attach-id-to-path-function-list if you want the folder structure in any other way. All functions in this list will be tried when resolving existing ID’s into paths, to maintain backward compatibility with existing folders in your system.
Stores a link to the file that is being attached. The link is stored in
org-stored-links for later insertion with
C-c C-l (see Handling Links). Depending on what option is set in
org-attach-store-link-p, the link is stored to either the original location as a file link, the attachment location as an attachment link or to the attachment location as a file link.
List of all commands used in the attach dispatcher.
Do not show the splash buffer with the attach dispatcher when
org-attach-expert is set to non-
See customization group ‘
Org Attach’ if you want to change the default settings.