From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#68041: 30.0.50; Tramp error with project-find-file Date: Tue, 26 Dec 2023 18:27:17 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------J7vUjs9nEWLw2D1gSoX33kQj" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11892"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric?= Giquel , 68041@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 26 17:42:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rIAVa-0002oS-On for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Dec 2023 17:42:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIAVM-0005zB-St; Tue, 26 Dec 2023 11:42:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIAVL-0005yl-0S for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 11:42:07 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIAVI-0004sf-0v for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 11:42:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIAVG-0000Ov-24 for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 11:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Dec 2023 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68041 X-GNU-PR-Package: emacs Original-Received: via spool by 68041-submit@debbugs.gnu.org id=B68041.17036088691396 (code B ref 68041); Tue, 26 Dec 2023 16:42:02 +0000 Original-Received: (at 68041) by debbugs.gnu.org; 26 Dec 2023 16:41:09 +0000 Original-Received: from localhost ([127.0.0.1]:34829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIAUO-0000MR-Hw for submit@debbugs.gnu.org; Tue, 26 Dec 2023 11:41:08 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:33467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIAUL-0000LT-J6 for 68041@debbugs.gnu.org; Tue, 26 Dec 2023 11:41:07 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6B5B15C009B; Tue, 26 Dec 2023 11:27:22 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 26 Dec 2023 11:27:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1703608042; x=1703694442; bh=mY5PE4lcSO bffHmDVCNFbmhACunu5qWybxAtMKzxsv4=; b=il1i6Jda/+oTTG3jZZy05w20po aWzXrsDJzWY1kSVaoIWssTuXmunUJpBSDErfj4/P+u2sLb639cqZTn5WiptFfj2E RKknmFmw0F4hT4J3EL8+79jFz9ZAZ0aS94Qr4NLwTkEcA/iaPuOkjqtxcogurdAY ue26hrQvjUf+P3ZBEtoLrDQOJX1zhfWBgfjSYAj6O3ecnSAeHEKer75O+SwFweJi qS07aNokPlmhYGDWXe7cpvYmDGoHfgCt1dYfbwSwxGldX2K+MM00IXZfabADbA+n YDPp2fz1FlFIyMNa1WP1Cz8deeMQXctNPqzPhE+KuWzTCsrb8LbiqsJ55n0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703608042; x=1703694442; bh=mY5PE4lcSObffHmDVCNFbmhACunu 5qWybxAtMKzxsv4=; b=tFrYP7I3whP/28g5kpL/xhLIiivSY83/yMScQOHydW6U TUZjGqB5CNcwEyfwDwl1vypLzULpLEYUwQir3RqI+wGU/mYghFxyRjbgafaBKwr5 CmrC6h0JLHwyTsNMjtQkkjd/KuZmtVQSP9mTlJAtmobxZugyDAcBJT1vZsIb9vQp axS4JX+gw1W9D5IdOSuYaFltcrdiuZM4bWCha3SQCEV/3/CLMMbLLyb0Sur3FWzT jUy/ZqvZSIUBB9Ix/BeFHW7fw6VaTSM3GBH95cOyYbpqSaLJyA2prxH0Ta3nvhbQ UIujnCtDj/gQJMHXQsQgb6IGxlsXR6/tYfFS3uniVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddvjedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuvfhfhfgjsehmtderredtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnhepkefhieejheehjefhhefhuddvteettedvgeelteeigeelueegheffueffleduvdff necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Dec 2023 11:27:21 -0500 (EST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276910 Archived-At: This is a multi-part message in MIME format. --------------J7vUjs9nEWLw2D1gSoX33kQj Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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? --------------J7vUjs9nEWLw2D1gSoX33kQj Content-Type: text/x-patch; charset=UTF-8; name="project--read-file-cpd-relative-no-connect.diff" Content-Disposition: attachment; filename="project--read-file-cpd-relative-no-connect.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwgYi9saXNwL3Byb2dtb2Rl cy9wcm9qZWN0LmVsCmluZGV4IDAwODJmMTI2NjZhLi5kYzBmZDlhNmVmZSAxMDA2NDQKLS0t IGEvbGlzcC9wcm9nbW9kZXMvcHJvamVjdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9wcm9q ZWN0LmVsCkBAIC0xMTQ3LDE0ICsxMTQ3LDE1IEBAIHByb2plY3QtLXJlYWQtZmlsZS1jcGQt cmVsYXRpdmUKICAgICAgICAgIChuZXctY29sbGVjdGlvbiAocHJvamVjdC0tZmlsZS1jb21w bGV0aW9uLXRhYmxlIHN1YnN0cmluZ3MpKQogICAgICAgICAgKGFicy1jcGQgKGV4cGFuZC1m aWxlLW5hbWUgY29tbW9uLXBhcmVudC1kaXJlY3RvcnkpKQogICAgICAgICAgKGFicy1jcGQt bGVuZ3RoIChsZW5ndGggYWJzLWNwZCkpCi0gICAgICAgICAocmVsbmFtZSAoY2wtbGV0ZiAo KChzeW1ib2wtdmFsdWUgaGlzdCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1h cGNhbgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAocykKLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldHEgcyAoZXhwYW5kLWZpbGUtbmFtZSBz KSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFuZCAoc3RyaW5nLXByZWZp eC1wIGFicy1jcGQgcykKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo bm90IChlcSBhYnMtY3BkLWxlbmd0aCAobGVuZ3RoIHMpKSkKLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAobGlzdCAoc3Vic3RyaW5nIHMgYWJzLWNwZC1sZW5ndGgp KSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3ltYm9sLXZhbHVlIGhpc3Qp KSkpCisgICAgICAgICAocmVsbmFtZSAoY2wtbGV0ZiogKChub24tZXNzZW50aWFsIHQpIDtB dm9pZCBuZXcgY29ubmVjdGlvbnMgaW4gVHJhbXAuCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICgoc3ltYm9sLXZhbHVlIGhpc3QpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAobWFwY2FuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAo cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIHMgKGV4cGFuZC1m aWxlLW5hbWUgcykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW5kIChz dHJpbmctcHJlZml4LXAgYWJzLWNwZCBzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAobm90IChlcSBhYnMtY3BkLWxlbmd0aCAobGVuZ3RoIHMpKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxpc3QgKHN1YnN0cmluZyBzIGFi cy1jcGQtbGVuZ3RoKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzeW1i b2wtdmFsdWUgaGlzdCkpKSkKICAgICAgICAgICAgICAgICAgICAgKHByb2plY3QtLWNvbXBs ZXRpbmctcmVhZC1zdHJpY3QgcHJvbXB0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG5ldy1jb2xsZWN0aW9uCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWRpY2F0ZQo= --------------J7vUjs9nEWLw2D1gSoX33kQj--