emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68041: closed (30.0.50; Tramp error with project-find-file)


From: GNU bug Tracking System
Subject: bug#68041: closed (30.0.50; Tramp error with project-find-file)
Date: Wed, 27 Dec 2023 00:23:02 +0000

Your message dated Wed, 27 Dec 2023 02:22:04 +0200
with message-id <0276aeb6-e2f6-4790-835a-05a275e97330@gutov.dev>
and subject line Re: bug#68041: 30.0.50; Tramp error with project-find-file
has caused the debbugs.gnu.org bug report #68041,
regarding 30.0.50; Tramp error with project-find-file
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
68041: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68041
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; Tramp error with project-find-file Date: Tue, 26 Dec 2023 14:06:20 +0100 User-agent: Evolution 3.50.2-1
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).


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.39, cairo version 1.18.0) of 2023-12-26 built on guiriden
Repository revision: 60199ac01d711d3240146afedd830b774eb5c5d2
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version
11.0.12302003
System Description: Debian GNU/Linux trixie/sid

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM GTK3 ZLIB

Important settings:
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tramp-cmds tramp-cache time-stamp tramp-sh tramp trampver
tramp-integration tramp-message help-mode tramp-compat xdg shell
pcomplete parse-time iso8601 time-date format-spec auth-source eieio
eieio-core cl-macs password-cache json subr-x map tramp-loaddefs vc-git
diff-mode easy-mmode vc-dispatcher thingatpt cl-seq project byte-opt gv
compile text-property-search comint ansi-osc ansi-color ring comp-run
bytecomp byte-compile comp-common rx dired-aux cl-loaddefs cl-lib
files-x dired dired-loaddefs rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd
fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-
generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 120492 10139) (symbols 48 9772 0) (strings 32 32853 1588)
 (string-bytes 1 1030498) (vectors 16 21995)
 (vector-slots 8 428265 15164) (floats 8 36 28) (intervals 56 690 0)
 (buffers 992 14))

Attachment: project-find-file.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#68041: 30.0.50; Tramp error with project-find-file Date: Wed, 27 Dec 2023 02:22:04 +0200 User-agent: Mozilla Thunderbird
On 26/12/2023 21:48, Frédéric Giquel wrote:
Le mardi 26 décembre 2023 à 18:27 +0200, Dmitry Gutov a écrit :
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?
I tested your patch. It works well: no error and no perceived latency.

Great! Thanks for testing, pushed to master.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]