mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Expand %:P relative to % instead of current buffer
So ~/some/other/project/somefile.txt:P will resolve to ~/some/other/project, and not the project root of the current buffer.
This commit is contained in:
@ -133,8 +133,7 @@ more information on modifiers."
|
|||||||
(unless global 1))))
|
(unless global 1))))
|
||||||
path))
|
path))
|
||||||
("P"
|
("P"
|
||||||
(let* ((default-directory (file-name-directory (expand-file-name path)))
|
(let ((project-root (doom-project-root (file-name-directory (expand-file-name path)))))
|
||||||
(project-root (doom-project-root)))
|
|
||||||
(unless project-root
|
(unless project-root
|
||||||
(user-error "Not in a project"))
|
(user-error "Not in a project"))
|
||||||
(abbreviate-file-name project-root)))
|
(abbreviate-file-name project-root)))
|
||||||
|
Reference in New Issue
Block a user