org/org-attach: support relative paths in inline images

This commit is contained in:
Henrik Lissner 2017-11-14 01:50:58 +01:00
parent c2bb5a0951
commit 902edfce24
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 19 additions and 0 deletions

View file

@ -44,6 +44,9 @@
((executable-find "scrot")
"scrot -s %s")))))
;; Ensure that relative inline image paths are relative to the attachment folder.
(advice-add #'org-display-inline-images :around #'+org-attach*relative-to-attach-dir)
;; Handle non-image files a little differently. Images should be inserted
;; as-is, as image previews. Other files, like pdfs or zips, should be linked
;; to, with an icon indicating the type of file.