commit 420290572b78c275f1711df956c28b2852253cc2 parent e4608d6dca5d7cc4e8903c5cb823bdb6e86c3642 Author: andsy10 <andsy1016@gmail.com> Date: Mon, 12 Oct 2026 18:46:45 +0800 Fork org-download Diffstat:
| M | lisp/init-org.el | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/init-org.el b/lisp/init-org.el @@ -267,10 +267,16 @@ ;; easier to insert images (my-use-package org-download + :straight + (org-download :fork (:type git :host nil :repo "https://git.trogloxene.org/org-download.git")) :after org :demand t :config - (setq-default org-download-image-dir "./images/" + (defun my-org-download-image-dir-function () + (expand-file-name "images/" + (project-root (or (project-current nil) + '(vc Git "./"))))) + (setq-default org-download-image-dir #'my-org-download-image-dir-function org-download-heading-lvl nil) (setq org-download-timestamp "%Y%m%dT%H%M%S--" org-download-link-format "[[denote:%s]]\n"