Subject: Re: bug#60505: 29.0.60; Fido Mode and Tramp Completion

From: Michael Albinus <[email-masked]>
Date: Tue, 07 Feb 2023 09:54:14 +0100

Michael Heerdegen <[email-masked]> writes:

Hi Michael,

>> I've improved the patch, and I've committed it to master. It works now
>> for all different Tramp syntaxes as well as for all completion styles
>> except `initials' and `shorthand'. Likely, these two are not so relevant
>> for file name completion.
>
> This breaks Emacs horribly: in emacs -Q (require 'tramp) and M-x dired RET
> for example:
>
> Debugger entered--Lisp error: (file-missing "Searching for program" "No such file or directory" "ls")
>   (call-process "ls" nil nil nil "--dired")
>   ...
>   (dired-noselect "~/" nil)

I'm very sorry about this. Strangely, I cannot reproduce the problem
with your recipe.

> All programs seem to be gone, shells etc.  I thought my Laptop had died!
> Rebasing with your commit omitted fixes the problem.

Does the appended patch fixes this for you?

> Michael.

Best regards, Michael.

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 69812506e48..b75a1816fdb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2773,7 +2773,7 @@ tramp-completion-file-name-handler
   "Invoke Tramp file name completion handler for OPERATION and ARGS.
 Falls back to normal file name handler if no Tramp file name handler exists."
   (if-let
-      ((fn (and tramp-mode
+      ((fn (and tramp-mode minibuffer-completing-file-name
 		(assoc operation tramp-completion-file-name-handler-alist))))
       (save-match-data (apply (cdr fn) args))
     (tramp-run-real-handler operation args)))