fix: :load-path throwing error in org-src blocks
Because src blocks don't provide a valid load-file-name or buffer-file-name, dir! cannot resolve the current file's path. Fix: #6241
This commit is contained in:
parent
499cf5e626
commit
f2f583bfb7
1 changed files with 5 additions and 1 deletions
|
@ -373,7 +373,11 @@ This value is cached. If REFRESH-P, then don't use the cached value."
|
|||
:around #'use-package-normalize-paths
|
||||
;; `use-package-normalize-paths' resolves paths relative to
|
||||
;; `user-emacs-directory', so we change that.
|
||||
(let ((user-emacs-directory (if (stringp arg) (dir!))))
|
||||
(let ((user-emacs-directory
|
||||
(or (and (stringp arg)
|
||||
(not (file-name-absolute-p arg))
|
||||
(ignore-errors (dir!)))
|
||||
user-emacs-directory)))
|
||||
(funcall fn label arg recursed)))
|
||||
|
||||
;; Adds two keywords to `use-package' to expand its lazy-loading capabilities:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue