GNU bug report logs -
#79173
30.1; TRAMP simplified syntax produces empty completing-read candidates
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Mon, 4 Aug 2025 23:17:01 UTC
Severity: normal
Tags: patch
Found in version 30.1
Fixed in version 30.3
Done: Michael Albinus <michael.albinus <at> gmx.de>
To reply to this bug, email your comments to 79173 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Mon, 04 Aug 2025 23:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 04 Aug 2025 23:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I’m a bit unsure how to demonstrate this bug in vanilla Emacs. See
https://github.com/minad/vertico/discussions/623 for the original
context in which I found this problem, using the vertico package. The
author assures me this is an Emacs bug, and gives his reasoning there.
Also, according to him it is possible that it has already been fixed on
master.
The problem is that when `tramp-syntax` is set to `simplified`, then
`find-file` can produce an empty completion for `completing-read`. (The
vertico author’s suggestion is that empty completions are invalid.)
Emacs then tries to add a text property to a one-character span of this
empty completion candidate, which of course does not work.
I give steps to reproduce in the bug report above, but they require the
use of vertico, which is obviously not ideal, apologies. It seems that
in vanilla Emacs the bug does not have obvious consequences.
I can confirm at least that the bug also manifests when the user has no
`.ssh/config` file.
In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0) of 2025-02-25, modified by Debian built on
lcy02-amd64-066
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Ubuntu 24.04.2 LTS
Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/libexec
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-libsystemd --with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --build
x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/libexec --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd
--with-pop=yes
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp
--with-sound=alsa --without-gconf --with-mailutils --with-cairo
--with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
'CFLAGS=-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/build/emacs-XzQpMq/emacs-30.1=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection
-fdebug-prefix-map=/build/emacs-XzQpMq/emacs-30.1=/usr/src/emacs-1:30.1-0build1~ubuntu2404
-Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=3'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
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 $LC_MONETARY: en_GB.UTF-8
value of $LC_NUMERIC: en_GB.UTF-8
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_GB.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
Major mode: Markdown
Minor modes in effect:
global-jinx-mode: t
jinx-mode: t
window-margin-mode: t
adaptive-wrap-prefix-mode: t
word-wrap-whitespace-mode: t
goto-address-mode: t
smart-quotes-mode: t
global-git-commit-mode: t
override-global-mode: t
server-mode: t
global-flycheck-mode: t
yas-global-mode: t
yas-minor-mode: t
vertico-multiform-mode: t
vertico-mode: t
savehist-mode: t
save-place-mode: t
repeat-mode: t
recentf-mode: t
minibuffer-electric-default-mode: t
marginalia-mode: t
global-whitespace-mode: t
global-auto-revert-mode: t
electric-pair-mode: t
editorconfig-mode: t
dtrt-indent-global-mode: t
dtrt-indent-mode: t
ctrlf-mode: t
ctrlf-local-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
column-number-mode: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
auto-save-visited-mode: t
Load-path shadows:
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig-core hides /usr/share/emacs/30.1/lisp/editorconfig-core
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig-conf-mode hides /usr/share/emacs/30.1/lisp/editorconfig-conf-mode
/home/rrt/.emacs.d/elpa/transient-0.9.4/transient hides /usr/share/emacs/30.1/lisp/transient
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig-fnmatch hides /usr/share/emacs/30.1/lisp/editorconfig-fnmatch
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig hides /usr/share/emacs/30.1/lisp/editorconfig
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig-tools hides /usr/share/emacs/30.1/lisp/editorconfig-tools
/home/rrt/.emacs.d/elpa/editorconfig-20250219.1528/editorconfig-core-handle hides /usr/share/emacs/30.1/lisp/editorconfig-core-handle
/home/rrt/.emacs.d/elpa/python-0.30/python hides /usr/share/emacs/30.1/lisp/progmodes/python
/home/rrt/.emacs.d/elpa/dictionary-20201001.1727/dictionary hides /usr/share/emacs/30.1/lisp/net/dictionary
Features:
(shadow sort mail-extr emacsbug help-fns radix-tree mule-util
vertico-sort ispell jinx window-margin adaptive-wrap word-wrap-mode
goto-addr smart-quotes smart-mode-line advice rich-minority zetteldeft
ace-window avy deft typescript-ts-mode js c-ts-common cc-mode cc-fonts
cc-guess cc-menus cc-cmds texinfo texinfo-loaddefs iimage flycheck-nim
nim-mode commenter nim-fill nim-smie let-alist smie nim-helper nim-util
nim-syntax nim-rx nim-vars git-commit log-edit message sendmail
yank-media rfc822 mml mml-sec epa gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log
go-mode find-file ffap etags fileloop generator dired-x cc-styles
cc-align cc-engine derived lsp lsp-mode lsp-protocol xref project
spinner network-stream puny nsm markdown-mode color noutline outline lv
inline imenu ht f s ewoc epg rfc6068 epg-config dash compile
text-property-search ctrlf hl-line orderless use-package-ensure
use-package-bind-key bind-key magit-process with-editor server
magit-mode transient pp edmacro kmacro benchmark magit-git magit-base
magit-section cursor-sensor crm llama comp comp-cstr warnings comp-run
comp-common use-package-core bug-reference-github bug-reference
thingatpt vc-git diff-mode track-changes vc-dispatcher flycheck
find-func cl-extra tramp-cache time-stamp tramp-cmds
smart-mode-line-dark-theme rrt-theme yasnippet vertico-multiform vertico
savehist saveplace tramp trampver tramp-integration files-x
tramp-message help-mode tramp-compat xdg shell pcomplete comint ansi-osc
ring parse-time iso8601 time-date format-spec ansi-color tramp-loaddefs
repeat recentf tree-widget wid-edit minibuf-eldef marginalia compat
whitespace autorevert filenotify elec-pair editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
dtrt-indent desktop frameset cus-load user-site-loaddefs cc-vars cc-defs
treesit 0blayout-autoloads ada-mode-autoloads adoc-mode-autoloads
apache-mode-autoloads async-autoloads auctex-latexmk-autoloads
auctex-autoloads tex-site browse-kill-ring-autoloads
bug-reference-github-autoloads cmake-mode-autoloads company-autoloads
consult-lsp-autoloads csv-autoloads csv-mode-autoloads ctrlf-autoloads
easy-mmode cython-mode-autoloads dictionary-autoloads
connection-autoloads dired-atool-autoloads dired-efap-autoloads
direnv-autoloads dmacro-autoloads dockerfile-mode-autoloads
dos-autoloads dpkg-dev-el-autoloads debian-el-autoloads debian-el dired
dired-loaddefs dynamic-fonts-autoloads editorconfig-autoloads
eldoc-extension-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads flymake-cursor-autoloads forge-autoloads
closql-autoloads emacsql-autoloads fuzzy-autoloads
geiser-guile-autoloads geiser-autoloads ggo-mode-autoloads
ghub-autoloads gnat-compiler-autoloads go-eldoc-autoloads
go-mode-autoloads graphviz-dot-mode-autoloads haskell-mode-autoloads
highlight-indentation-autoloads hover-autoloads hyperspace-autoloads
inputrc-mode-autoloads jade-mode-autoloads jedi-autoloads
auto-complete-autoloads jedi-core-autoloads jinx-autoloads
json-mode-autoloads json-reformat-autoloads json-snatcher-autoloads
link-autoloads lsp-pyright-autoloads lsp-ui-autoloads lsp-mode-autoloads
ht-autoloads f-autoloads lua-mode-autoloads magit-autoloads pcase
magit-section-autoloads llama-autoloads marginalia-autoloads
markdown-preview-mode-autoloads markdown-mode-autoloads
meson-mode-autoloads nim-mode-autoloads flycheck-nimsuggest-autoloads
flycheck-autoloads commenter-autoloads epc-autoloads ctable-autoloads
concurrent-autoloads orderless-autoloads org-bullets-autoloads
org-real-autoloads boxy-autoloads package-lint-autoloads
paredit-autoloads perl-completion-autoloads popup-autoloads
posframe-autoloads projectile-autoloads protobuf-mode-autoloads
python-autoloads python-environment-autoloads deferred-autoloads
python-isort-autoloads reformatter-autoloads
region-occurrences-highlighter-autoloads request-autoloads
rust-mode-autoloads s-autoloads smart-mode-line-autoloads
sws-mode-autoloads systemd-autoloads rx transient-autoloads
treepy-autoloads unicode-fonts-autoloads font-utils-autoloads
unicode-whitespace-autoloads ucs-utils-autoloads
persistent-soft-autoloads list-utils-autoloads pcache-autoloads
dash-autoloads vertico-autoloads websocket-autoloads wgrep-autoloads
wisi-autoloads with-editor-autoloads info writeroom-mode-autoloads
visual-fill-column-autoloads yaml-autoloads yaml-mode-autoloads
deft-autoloads package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs icons password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib 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 499678 539672) (symbols 48 35095 5) (strings 32 184136 126360)
(string-bytes 1 7603928) (vectors 16 72623) (vector-slots 8 815144 81032)
(floats 8 299 1827) (intervals 56 3798 745) (buffers 992 12))
--
https://rrt.sc3d.org
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Tue, 05 Aug 2025 08:15:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79173 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
Hi Reuben,
> I’m a bit unsure how to demonstrate this bug in vanilla Emacs. See
> https://github.com/minad/vertico/discussions/623 for the original
> context in which I found this problem, using the vertico package. The
> author assures me this is an Emacs bug, and gives his reasoning there.
Thanks for the bug report. Yes, I could reproduce the problem according
to your recipe with Emacs 30. I'm using a recent build from the emacs-30
branch:
--8<---------------cut here---------------start------------->8---
GNU Emacs 31.0.50 (build 13, x86_64-pc-linux-gnu, GTK+ Version
3.24.49, cairo version 1.18.2) of 2025-07-22
--8<---------------cut here---------------end--------------->8---
> Also, according to him it is possible that it has already been fixed on
> master.
I've modified your recipe slightly in my next test. In package-isolate,
I've said vertico-2.4,tramp-2.8.0.1 :
--8<---------------cut here---------------start------------->8---
;; - compat-30.1.0.0 (dependency)
;; - seq-2.24 (dependency)
;; - tramp-2.8.0.1
;; - vertico-2.4
--8<---------------cut here---------------end--------------->8---
Tramp 2.8 is the version in Emacs' master branch. The same problem
appeared.
Now a third test, like the first one but using Emacs 31 from the master
branch. No error happens.
Conclusion: the problem is fixed im Emacs' master branch. Unfortunately,
this fix is not in Tramp itself, so it doesn't suffices to use a recent
Tramp version from ELPA.
So I propose to close your bug. This is unfortune for people using Emacs
30, but I don't know what and how to backport.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Tue, 05 Aug 2025 08:26:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79173 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Conclusion: the problem is fixed im Emacs' master branch. Unfortunately,
> this fix is not in Tramp itself, so it doesn't suffices to use a recent
> Tramp version from ELPA.
NB: This problem is not related to vertico. A simple recipe:
--8<---------------cut here---------------start------------->8---
emacs -Q -l tramp --eval "(tramp-change-syntax 'simplified)" --eval '(setq debug-on-error t)'
C-x C-f / TAB TAB
--8<---------------cut here---------------end--------------->8---
This shows the problem with Emacs 30. With Emacs 31, no problem.
> So I propose to close your bug. This is unfortune for people using Emacs
> 30, but I don't know what and how to backport.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Tue, 05 Aug 2025 10:58:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 5 Aug 2025 at 09:25, Michael Albinus <michael.albinus <at> gmx.de> wrote:
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> > Conclusion: the problem is fixed im Emacs' master branch. Unfortunately,
> > this fix is not in Tramp itself, so it doesn't suffices to use a recent
> > Tramp version from ELPA.
>
Many thanks for the rapid confirmation diagnosis.
I have a question: presumably the latest version of TRAMP still generates
empty completion-read candidates. I think the question still needs
answering: is this valid? If not, then whatever has changed in Emacs 31 is
just masking a bug that still exists in TRAMP.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Tue, 05 Aug 2025 12:22:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> I have a question: presumably the latest version of TRAMP still
> generates empty completion-read candidates. I think the question still
> needs answering: is this valid? If not, then whatever has changed in
> Emacs 31 is just masking a bug that still exists in TRAMP.
Good point. Could you pls check the appended patch? Since this touches a
macro, you must recompile first tramp.el, and afterwards tramp-sh.el.
Best regards, Michael.
[Message part 2 (text/x-patch, attachment)]
Added tag(s) patch.
Request was from
Michael Albinus <michael.albinus <at> gmx.de>
to
control <at> debbugs.gnu.org
.
(Tue, 05 Aug 2025 12:22:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Tue, 05 Aug 2025 21:41:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 5 Aug 2025 at 13:21, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Good point. Could you pls check the appended patch? Since this touches a
> macro, you must recompile first tramp.el, and afterwards tramp-sh.el.
>
Thanks very much for the patch!
I installed this patch by first installing tramp 2.8.0.1 in Emacs 30.1 from
ELPA, then applying the patch, then starting Emacs and recompiling tramp.sh
and tramp-sh.el, then restarting Emacs.
This did not quite have the expected effect.
The error from vertico was gone, but when I type a single slash at the
find-file prompt, I now get prompted to log in to an SSH host. This sounds
as though two lists have gotten out of sync: one with the empty entry, and
one without. Do let me know if I can do further investigation.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Wed, 06 Aug 2025 07:31:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> I installed this patch by first installing tramp 2.8.0.1 in Emacs 30.1
> from ELPA, then applying the patch, then starting Emacs and
> recompiling tramp.sh and tramp-sh.el, then restarting Emacs.
>
> This did not quite have the expected effect.
>
> The error from vertico was gone, but when I type a single slash at the
> find-file prompt, I now get prompted to log in to an SSH host. This
> sounds as though two lists have gotten out of sync: one with the empty
> entry, and one without. Do let me know if I can do further
> investigation.
Same here with vertico. This now seems a vertico error. The backtrace is
as follows:
--8<---------------cut here---------------start------------->8---
backtrace()
tramp-error((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) file-error #("Tramp failed to connect. If this happens repeatedly, try\n ‘M-x tramp-cleanup-this-connection’" 63 96 (font-lock-face help-key-binding face help-key-binding)))
apply(tramp-error (tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) file-error #("Tramp failed to connect. If this happens repeatedly, try\n ‘M-x tramp-cleanup-this-connection’" 63 96 (font-lock-face help-key-binding face help-key-binding)) nil)
tramp-process-actions(#<process *tramp/scp infempbln01.int.infinit-services.com*> (tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) 1 ((tramp-login-prompt-regexp tramp-action-login) (tramp-password-prompt-regexp tramp-action-password) (tramp-otp-password-prompt-regexp tramp-action-otp-password) (tramp-fingerprint-prompt-regexp tramp-action-fingerprint) (tramp-wrong-passwd-regexp tramp-action-permission-denied) (shell-prompt-pattern tramp-action-succeed) (tramp-shell-prompt-pattern tramp-action-succeed) (tramp-yesno-prompt-regexp tramp-action-yesno) (tramp-yn-prompt-regexp tramp-action-yn) (tramp-terminal-prompt-regexp tramp-action-terminal) (tramp-antispoof-regexp tramp-action-confirm-message) (tramp-security-key-confirm-regexp tramp-action-show-and-confirm-message) (tramp-security-key-pin-regexp tramp-action-otp-password) (tramp-process-alive-regexp tramp-action-process-alive)) 60)
tramp-maybe-open-connection((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil))
tramp-send-command((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "echo ~ 2>/dev/null; echo tramp_exit_status $?")
tramp-send-command-and-check((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "echo ~")
tramp-sh-handle-get-home-directory((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "")
tramp-sh-file-name-handler(tramp-get-home-directory (tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "")
apply(tramp-sh-file-name-handler tramp-get-home-directory ((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) ""))
tramp-file-name-handler(tramp-get-home-directory (tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "")
tramp-get-home-directory((tramp-file-name #("scp" 0 3 (tramp-default t)) nil nil "infempbln01.int.infinit-services.com" nil "" nil) "")
tramp-sh-handle-expand-file-name("/infempbln01.int.infinit-services.com:" nil)
tramp-sh-file-name-handler(expand-file-name "/infempbln01.int.infinit-services.com:" nil)
apply(tramp-sh-file-name-handler expand-file-name ("/infempbln01.int.infinit-services.com:" nil))
tramp-file-name-handler(expand-file-name "/infempbln01.int.infinit-services.com:" nil)
file-name-all-completions("" "/infempbln01.int.infinit-services.com:")
completion-file-name-table("/infempbln01.int.infinit-services.com:" file-exists-p t)
completion-pcm--all-completions("/infempbln01.int.infinit-services.com:" nil completion-file-name-table file-exists-p)
completion-pcm--find-all-completions("/i-:" completion-file-name-table file-exists-p 4)
completion-pcm-all-completions("/i-:" completion-file-name-table file-exists-p 4)
#f(compiled-function (style) #<bytecode -0x851335bf00f499a>)(partial-completion)
#f(compiled-function (elt) #<bytecode 0x114e79b73560d32b>)(partial-completion)
mapc(#f(compiled-function (elt) #<bytecode 0x114e79b73560d32b>) (basic partial-completion emacs22))
seq-do(#f(compiled-function (elt) #<bytecode 0x114e79b73560d32b>) (basic partial-completion emacs22))
seq-some(#f(compiled-function (style) #<bytecode -0x851335bf00f499a>) (basic partial-completion emacs22))
completion--nth-completion(2 "~/src/emacs-30//i-:" read-file-name-internal file-exists-p 19 (metadata (category . file) (completion--unquote-requote . t)))
completion-all-completions("~/src/emacs-30//i-:" read-file-name-internal file-exists-p 19 (metadata (category . file) (completion--unquote-requote . t)))
vertico--filter-completions("~/src/emacs-30//i-:" read-file-name-internal file-exists-p 19 (metadata (category . file) (completion--unquote-requote . t)))
vertico--recompute(19 "~/src/emacs-30//i-:")
vertico--update(interruptible)
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_13>()
#f(compiled-function () #<bytecode 0x18c0b2df11f5>)()
handler-bind-1(#f(compiled-function () #<bytecode 0x18c0b2df11f5>) (error) vertico--debug)
vertico--protect(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_13>)
vertico--exhibit()
#<subr completing-read-default>("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/src/emacs-30/" file-name-history "~/src/emacs-30/" nil)
apply((#<subr completing-read-default> "Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/src/emacs-30/" file-name-history "~/src/emacs-30/" nil))
vertico--advice(#<subr completing-read-default> "Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/src/emacs-30/" file-name-history "~/src/emacs-30/" nil)
apply(vertico--advice #<subr completing-read-default> ("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/src/emacs-30/" file-name-history "~/src/emacs-30/" nil))
completing-read-default("Find file: " read-file-name-internal file-exists-p confirm-after-completion "~/src/emacs-30/" file-name-history "~/src/emacs-30/" nil)
read-file-name-default("Find file: " nil "~/src/emacs-30/" confirm-after-completion nil nil)
read-file-name("Find file: " nil "~/src/emacs-30/" confirm-after-completion)
find-file-read-args("Find file: " confirm-after-completion)
byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
command-execute(find-file)
--8<---------------cut here---------------end--------------->8---
As we see, there is
--8<---------------cut here---------------start------------->8---
completion-pcm--all-completions("/infempbln01.int.infinit-services.com:" nil completion-file-name-table file-exists-p)
completion-pcm--find-all-completions("/i-:" completion-file-name-table file-exists-p 4)
completion-pcm-all-completions("/i-:" completion-file-name-table file-exists-p 4)
...
vertico--filter-completions("~/src/emacs-30//i-:" read-file-name-internal file-exists-p 19 (metadata (category . file) (completion--unquote-requote . t)))
--8<---------------cut here---------------end--------------->8---
This is OK, "infempbln01.int.infinit-services.com" is a valid completion
for "/i-:". However, vertico must not trigger to open that host. This
can be achieved by let-binding minibuffer-completing-file-name, for
example by the following patch in vertico.el:
[Message part 2 (text/x-patch, inline)]
*** /home/albinus/.emacs.d/elpa/vertico-2.4/vertico.el.~1~ 2025-08-05 09:44:34.923858379 +0200
--- /home/albinus/.emacs.d/elpa/vertico-2.4/vertico.el 2025-08-06 09:21:14.376181020 +0200
***************
*** 211,217 ****
(defun vertico--filter-completions (&rest args)
"Compute all completions for ARGS with lazy highlighting."
! (dlet ((completion-lazy-hilit t) (completion-lazy-hilit-fn nil))
(static-if (>= emacs-major-version 30)
(cons (apply #'completion-all-completions args) completion-lazy-hilit-fn)
(cl-letf* ((orig-pcm (symbol-function #'completion-pcm--hilit-commonality))
--- 211,217 ----
(defun vertico--filter-completions (&rest args)
"Compute all completions for ARGS with lazy highlighting."
! (dlet ((completion-lazy-hilit t) (completion-lazy-hilit-fn nil) (minibuffer-completing-file-name t))
(static-if (>= emacs-major-version 30)
(cons (apply #'completion-all-completions args) completion-lazy-hilit-fn)
(cl-letf* ((orig-pcm (symbol-function #'completion-pcm--hilit-commonality))
[Message part 3 (text/plain, inline)]
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Wed, 06 Aug 2025 17:22:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 6 Aug 2025 at 08:30, Michael Albinus <michael.albinus <at> gmx.de> wrote:
> Reuben Thomas <rrt <at> sc3d.org> writes:
>
> Same here with vertico. This now seems a vertico error[…]vertico must not
> trigger to open that host. This
> can be achieved by let-binding minibuffer-completing-file-name, for example
> by the following patch in vertico.el.
Many thanks for the analysis and patch. I have notified the vertico
maintainer.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Wed, 06 Aug 2025 18:03:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 6 Aug 2025 at 18:21, Reuben Thomas <rrt <at> sc3d.org> wrote:
>
> Many thanks for the analysis and patch. I have notified the vertico
> maintainer.
>
The vertico maintainer does not believe the patch for vertico is correct:
https://github.com/minad/vertico/discussions/623#discussioncomment-14023927
I just wanted to ensure that this doesn't affect the diagnosis of and the
patch to TRAMP.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 07:37:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 79173 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> The vertico maintainer does not believe the patch for vertico is
> correct:
> https://github.com/minad/vertico/discussions/623#discussioncomment-14023927
>
> I just wanted to ensure that this doesn't affect the diagnosis of and
> the patch to TRAMP.
I've pushed the Tramp patch to the repositories. Will be available with
Emacs 31. And it will be also be part of the next GNU ELPA release,
Tramp 2.8.0.2.
I've tried your scenario, again, with the recompiled Emacs 31. I cannot
reproduce the error any longer. Could you, pls, check?
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 11:51:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 08:36, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> I've pushed the Tramp patch to the repositories. Will be available with
> Emacs 31. And it will be also be part of the next GNU ELPA release,
> Tramp 2.8.0.2.
>
> I've tried your scenario, again, with the recompiled Emacs 31. I cannot
> reproduce the error any longer. Could you, pls, check?
>
I think there may be some confusion here. I am using Emacs 30, and have
never tested Emacs 31. I applied your patch to Tramp 2.8.0.1, and found the
different error, which you diagnosed as a vertico bug, in Emacs 30.
Since you say that with your TRAMP patch the problem ought not to arise in
Emacs 30, I was trying to understand whether the remaining problem is
indeed in vertico, or not (there may be some disagreement between you and
the vertico maintainer on this).
As to Emacs 31, it appears that other changes there may have concealed one
or more bugs, but since the fixes are in TRAMP and/or vertico, it doesn't
seem that there are any further implications for Emacs 31.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 12:49:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 79173 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> I think there may be some confusion here. I am using Emacs 30, and
> have never tested Emacs 31. I applied your patch to Tramp 2.8.0.1, and
> found the different error, which you diagnosed as a vertico bug, in
> Emacs 30.
After I've sent my message, I've realized that I should test with Emacs
30. So I did. I've transformed you recipe into the shell command
--8<---------------cut here---------------start------------->8---
# ~/src/emacs-30/src/emacs -Q -l ~/.emacs.d/elpa/compat-30.1.0.0/compat-autoloads.el -l ~/.emacs.d/elpa/seq-2.24/seq-autoloads.el -l ~/.emacs.d/elpa/vertico-2.4/vertico-autoloads.el -L /home/albinus/src/tramp/lisp -l tramp --eval "(tramp-change-syntax 'simplified)" -f vertico-mode
--8<---------------cut here---------------end--------------->8---
/home/albinus/src/tramp is the master branch of Tramp, including the
patch. This is what will be Tramp 2.8.0.2.
Typing 'C-x C-f /' works as expected.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 14:33:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 79173 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 13:48, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> After I've sent my message, I've realized that I should test with Emacs
> 30. So I did. I've transformed you recipe into the shell command
>
> --8<---------------cut here---------------start------------->8---
> # ~/src/emacs-30/src/emacs -Q -l
> ~/.emacs.d/elpa/compat-30.1.0.0/compat-autoloads.el -l
> ~/.emacs.d/elpa/seq-2.24/seq-autoloads.el -l
> ~/.emacs.d/elpa/vertico-2.4/vertico-autoloads.el -L
> /home/albinus/src/tramp/lisp -l tramp --eval "(tramp-change-syntax
> 'simplified)" -f vertico-mode
> --8<---------------cut here---------------end--------------->8---
>
> /home/albinus/src/tramp is the master branch of Tramp, including the
> patch. This is what will be Tramp 2.8.0.2.
>
> Typing 'C-x C-f /' works as expected.
>
Great, I can confirm this works for me too, also with my standard setup.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Thu, 07 Aug 2025 14:49:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
bug acknowledged by developer.
(Thu, 07 Aug 2025 14:49:02 GMT)
Full text and
rfc822 format available.
Message #48 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.3
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> Great, I can confirm this works for me too, also with my standard
> setup.
Thanks for the feedback. So I'm closing this bug for "Emacs 30.3". I
don't know whether this release will happen, but the current release
under test, Emacs 30.2, won't get this patch.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 16:34:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 15:48, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> > Great, I can confirm this works for me too, also with my standard
> > setup.
>
After some more testing, I can still reproduce the problem where with the
patched TRAMP 2.8.0.1, and using vertico 2.4, Emacs 30.1 tries to log into
a remote host when I type C-x C-f /
I have been unable to find the cause. On one machine, the problem occurs,
on the other it doesn't. They are using the same build of Emacs on the same
version of Ubuntu. I made my .emacs.d and .ssh directories diff-identical,
just to be sure.
The only thing I could discover was that when I change the contents of my
~/.ssh/known_hosts file, the remote machine that Emacs tries to log into
changes.
Making ~/.ssh/known_hosts empty did not help, it merely caused Emacs to
select a different remote host than the one it chose with my original
known_hosts file.
In all cases, the remote host Emacs was trying to connect to was one
mentioned in my ~/.ssh/config file, but this identical file is present on
the machine where I cannot reproduce the problem.
In any case, the contents of my SSH configuration should not really causing
a problem!
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 16:49:01 GMT)
Full text and
rfc822 format available.
Message #54 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 17:33, Reuben Thomas <rrt <at> sc3d.org> wrote:
>
> After some more testing, I can still reproduce the problem where with the
> patched TRAMP 2.8.0.1, and using vertico 2.4, Emacs 30.1 tries to log into
> a remote host when I type C-x C-f /
>
Something of a breakthrough: I still have the problem when I disable
vertico-mode. Stand down, Daniel!
Still no idea why it happens on one machine and not another with an
identical configuration. And it definitely doesn't happen when I run Emacs
with a minimal configuration.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 17:03:02 GMT)
Full text and
rfc822 format available.
Message #57 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 17:47, Reuben Thomas <rrt <at> sc3d.org> wrote:
> On Thu, 7 Aug 2025 at 17:33, Reuben Thomas <rrt <at> sc3d.org> wrote:
>
>>
>> After some more testing, I can still reproduce the problem where with the
>> patched TRAMP 2.8.0.1, and using vertico 2.4, Emacs 30.1 tries to log into
>> a remote host when I type C-x C-f /
>>
>
Further, I can reproduce with Emacs 31 (git master at the time of writing).
I'll bisect my config.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 17:42:01 GMT)
Full text and
rfc822 format available.
Message #60 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> After some more testing, I can still reproduce the problem
> where with the patched TRAMP 2.8.0.1, and using vertico 2.4,
> Emacs 30.1 tries to log into a remote host when I type C-x C-f
> /
>
> Further, I can reproduce with Emacs 31 (git master at the time of
> writing). I'll bisect my config.
Pls try to provide a recipe starting with 'emacs -Q', like the one I
have shown in my last message. This makes it much more convenient to
hunt a bug.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Thu, 07 Aug 2025 18:35:02 GMT)
Full text and
rfc822 format available.
Message #63 received at 79173-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 7 Aug 2025 at 18:41, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
> Pls try to provide a recipe starting with 'emacs -Q', like the one I
> have shown in my last message. This makes it much more convenient to
> hunt a bug.
>
In the end, the problem turned out to be some advice for
completion-file-table-name I picked up from Stack Exchange:
https://emacs.stackexchange.com/a/45246/13004
to ignore dot files unless they are explicitly asked for in file-find.
I don't propose to try to delve into it; most likely, the bug is in that
code, and the reason that everything worked on one machine and not another
has to do with different disk contents.
Many thanks again for your help.
--
https://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79173
; Package
emacs
.
(Fri, 08 Aug 2025 07:13:02 GMT)
Full text and
rfc822 format available.
Message #66 received at 79173 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
Hi Reuben,
> In the end, the problem turned out to be some advice for
> completion-file-table-name I picked up from Stack Exchange:
> https://emacs.stackexchange.com/a/45246/13004
>
> to ignore dot files unless they are explicitly asked for in file-find.
Good to know there's no slumbering bug here in Emacs or Vertico.
> Many thanks again for your help.
Best regards, Michael.
This bug report was last modified 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.