I want a separate saving of my personal static images in a sub-directory:
~/org/static/personal
instead of ~/org/static
. Hence I'm trying to add a .dir-locals.el
file in my personal subdirectory ~/org/personal/
This is my main org-download config:
(setq org-download-image-dir "~/org/static/"
org-download-heading-lvl nil
org-download-image-attr-list
'("#+ATTR_ORG: :width 1000")
)
(after! org-download
(setq org-download-method 'directory
org-download-timestamp ""
org-download-link-format "[[file:~/org/static/%s]]\n"
))
Here is my attempted .dir-locals.el
:
((nil . ((org-download-image-dir . "~/org/static/personal/")))
(nil . ((eval (after! org-download (org-download-link-format "[[file:~/org/static/personal/%s]]\n"))))))
Emacs is correctly reading the first line and saving the images in ~/org/static/personal
, but it's not recognizing the new org-download-link-format
value. Hence the inline link of the image is coming incorrect - [[file:~/org/static/abc.png]]
in stead of [[file:~/org/static/personal/abc.png]]
.