updates
This commit is contained in:
@@ -121,10 +121,12 @@
|
||||
|
||||
(defun my/org-download-image-dir-setup ()
|
||||
"Create and set org-download-image-dir relative to current org file."
|
||||
(let* ((current-file-dir (file-name-directory (buffer-file-name)))
|
||||
(image-dir (expand-file-name "images" current-file-dir)))
|
||||
(make-directory image-dir t)
|
||||
(setq-local org-download-image-dir image-dir)))
|
||||
(let ((filename (buffer-file-name)))
|
||||
(when filename
|
||||
(let* ((current-file-dir (file-name-directory filename))
|
||||
(image-dir (expand-file-name "images" current-file-dir)))
|
||||
(make-directory image-dir t)
|
||||
(setq-local org-download-image-dir image-dir)))))
|
||||
|
||||
(add-hook 'org-mode-hook #'my/org-download-image-dir-setup)
|
||||
(setq org-download-link-format "[[file:%s]]\n")
|
||||
|
||||
Reference in New Issue
Block a user