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:
parent
7b761a9b42
commit
7c3cc3ed5f
1 changed files with 1 additions and 2 deletions
|
@ -133,8 +133,7 @@ more information on modifiers."
|
|||
(unless global 1))))
|
||||
path))
|
||||
("P"
|
||||
(let* ((default-directory (file-name-directory (expand-file-name path)))
|
||||
(project-root (doom-project-root)))
|
||||
(let ((project-root (doom-project-root (file-name-directory (expand-file-name path)))))
|
||||
(unless project-root
|
||||
(user-error "Not in a project"))
|
||||
(abbreviate-file-name project-root)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue