Use resolved, absolute paths in doom-project api
Ensures projectile caches files under the right key.
This commit is contained in:
parent
c0b00327c2
commit
803ca2863a
1 changed files with 3 additions and 3 deletions
|
@ -82,10 +82,10 @@ Will resolve to the nearest project root above DIR. If no project can be found,
|
||||||
the search will be rooted from DIR."
|
the search will be rooted from DIR."
|
||||||
(unless (file-directory-p dir)
|
(unless (file-directory-p dir)
|
||||||
(error "Directory %S does not exist" dir))
|
(error "Directory %S does not exist" dir))
|
||||||
(let* ((default-directory dir)
|
(let* ((default-directory (file-truename (expand-file-name dir)))
|
||||||
(projectile-project-root
|
(projectile-project-root
|
||||||
(or (projectile-project-root)
|
(or (projectile-project-root)
|
||||||
dir)))
|
default-directory)))
|
||||||
(call-interactively
|
(call-interactively
|
||||||
;; Intentionally avoid `helm-projectile-find-file', because it runs
|
;; Intentionally avoid `helm-projectile-find-file', because it runs
|
||||||
;; asynchronously, and thus doesn't see the lexical `default-directory'
|
;; asynchronously, and thus doesn't see the lexical `default-directory'
|
||||||
|
@ -96,7 +96,7 @@ the search will be rooted from DIR."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-project-browse (dir)
|
(defun doom-project-browse (dir)
|
||||||
"Traverse a file structure starting linearly from DIR."
|
"Traverse a file structure starting linearly from DIR."
|
||||||
(let ((default-directory (file-truename dir)))
|
(let ((default-directory (file-truename (expand-file-name dir))))
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(cond ((featurep! :completion ivy)
|
(cond ((featurep! :completion ivy)
|
||||||
#'counsel-find-file)
|
#'counsel-find-file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue