[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5213e92f203: Fix Tramp error in project-find-file
From: |
Dmitry Gutov |
Subject: |
master 5213e92f203: Fix Tramp error in project-find-file |
Date: |
Tue, 26 Dec 2023 19:21:02 -0500 (EST) |
branch: master
commit 5213e92f203b0ec934860d6026bdc5d3cddc0173
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Fix Tramp error in project-find-file
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Avoid new Tramp connections (bug#68041).
---
lisp/progmodes/project.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 0082f12666a..79bb3173d3d 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1147,14 +1147,15 @@ by the user at will."
(new-collection (project--file-completion-table substrings))
(abs-cpd (expand-file-name common-parent-directory))
(abs-cpd-length (length abs-cpd))
- (relname (cl-letf (((symbol-value hist)
- (mapcan
- (lambda (s)
- (setq s (expand-file-name s))
- (and (string-prefix-p abs-cpd s)
- (not (eq abs-cpd-length (length s)))
- (list (substring s abs-cpd-length))))
- (symbol-value hist))))
+ (relname (cl-letf* ((non-essential t) ;Avoid new Tramp connections.
+ ((symbol-value hist)
+ (mapcan
+ (lambda (s)
+ (setq s (expand-file-name s))
+ (and (string-prefix-p abs-cpd s)
+ (not (eq abs-cpd-length (length s)))
+ (list (substring s abs-cpd-length))))
+ (symbol-value hist))))
(project--completing-read-strict prompt
new-collection
predicate
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5213e92f203: Fix Tramp error in project-find-file,
Dmitry Gutov <=