3 ms·
Further explanation: When moving headings around, one can choose to also move the attachments along, for example, by relying on OLD-HEADING and NEW-HEADING's re
by alessivs 6y ago
Further explanation: When moving headings around, one can choose to also move the attachments along, for example, by relying on OLD-HEADING and NEW-HEADING's respective attachment directories. Changes to these directories can include external modifications (e.g. addition of files produced by a spreadsheet app). `org-attach-sync' makes sure these changes are propagated to the Org file (and/or its memory representation).
When referencing one of the attached files within the heading, one can use the `attachment' link type, which points to files resolving to the attachment directory[1]. The format is [[attachment:FILE-IN-ATTACHMENT-DIR][DESCRIPTION]] and can be easily inserted with completion by `org-insert-link'.
For more complicated attachment linking scenarios it might be better to configure the attachment directory to be absolute (`org-attach-id-dir').
Conclusion: The use of Org attachments and the attachment: link type stabilizes links to files.
[1]: https://orgmode.org/manual/Attachment-links.html https://orgmode.org/manual/Attachment-links.html