GNU bug report logs - #68041
30.0.50; Tramp error with project-find-file

Previous Next

Package: emacs;

Reported by: Frédéric Giquel <frederic.giquel <at> laposte.net>

Date: Tue, 26 Dec 2023 13:07:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 68041 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Frédéric Giquel <frederic.giquel <at> laposte.net>,
 68041 <at> debbugs.gnu.org
Subject: Re: bug#68041: 30.0.50; Tramp error with project-find-file
Date: Tue, 26 Dec 2023 18:27:17 +0200
[Message part 1 (text/plain, inline)]
Hi!

On 26/12/2023 15:06, Frédéric Giquel via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Hi,
> 
> Commits from last week on project.el
> (338409c1f19e1d3a97d12edaf5ac36f1a781d08a and
> 	0d518b78d785613967fb1b375aa7932385991891) introduce problems when fileshistorycontainsTrampreference.
> 
> Here is the procedure to repoduce :
> - launch an 'emacs -Q' session
> - eval (add-to-list 'file-name-history "/ssh:inaccessible-host:~/") to
> add Tramp reference in file history
> - open a local file from a project with 'find-file'
> - do 'M-x project-find-file'
> 
> This results in a 'Tramp failed to connect' error. If the host is
> accessible, there is no error but we can see trace of an SSH connection
> (with the associated latency). It's not something we expect when we're
> working on an entirely local project.
> 
> As far as I understand the 'project--read-file-cpd-relative' function,
> a simple fix is to limit 'expand-file-name' to local files (as in the
> attached patch).

Thanks for the report.

How about the attached patch instead?

Skipping expand-file-name altogether would likely drop the respective 
entries from history as well.

I'm curious whether expand-file-name hits the remote every time when 
called, though (100 times the latency would be a wait too long). If you 
have remote entries in history, could you try and see how the 
performance is when working on that remote, too?

[project--read-file-cpd-relative-no-connect.diff (text/x-patch, attachment)]

This bug report was last modified 1 year and 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.