[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 28ae8440c62: Unbreak project-find-file's future history when cpd
From: |
Dmitry Gutov |
Subject: |
master 28ae8440c62: Unbreak project-find-file's future history when cpd is not root |
Date: |
Fri, 11 Aug 2023 20:59:09 -0400 (EDT) |
branch: master
commit 28ae8440c62c71da2ef7e30c73333bc5a51efba6
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Unbreak project-find-file's future history when cpd is not root
* lisp/progmodes/project.el (project-find-file): Pass in
buffer-file-name as absolute name (bug#63829).
(project--read-file-cpd-relative): Make it relative to the
appropriate common parent dir.
---
lisp/progmodes/project.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 24531d9d02e..fe13f4ab114 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1005,7 +1005,7 @@ for VCS directories listed in
`vc-directory-exclusion-list'."
(dirs (list root)))
(project-find-file-in
(or (thing-at-point 'filename)
- (and buffer-file-name (file-relative-name buffer-file-name root)))
+ buffer-file-name)
dirs pr include-all)))
;;;###autoload
@@ -1058,6 +1058,11 @@ by the user at will."
(setq all-files
(delete common-parent-directory all-files))
t))
+ (mb-default (if (and common-parent-directory
+ mb-default
+ (file-name-absolute-p mb-default))
+ (file-relative-name mb-default
common-parent-directory)
+ mb-default))
(substrings (mapcar (lambda (s) (substring s cpd-length)) all-files))
(_ (when included-cpd
(setq substrings (cons "./" substrings))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 28ae8440c62: Unbreak project-find-file's future history when cpd is not root,
Dmitry Gutov <=