When I drag and drop an image into Emacs, I want the attached file to end up in ./img/YYYY/
. This is how I tried configuring org-download in my setup (I use Doom Emacs):
(setq org-download-method 'directory
org-download-image-dir (concat "img/" (format-time-string "%Y") "/")
org-download-image-org-width 600
org-download-heading-lvl 1)
For some reason, org-download-method
was being reset from 'directory
to 'attach
after loading, and this broke things. I thought maybe I needed to set the variables after org-download was loaded, so I did this: