Subject: bug#53283: 28.0.91; TRAMP SSHFS method not known by default

From: Philipp Stephani <[email-masked]>
Date: Sat, 15 Jan 2022 19:24:09 +0100

Am Sa., 15. Jan. 2022 um 14:06 Uhr schrieb Philipp Stephani
<[email-masked]>:
>
>
> First, thanks for adding the SSHFS method, it works really well in
> general!  However, I think it should be available by default:
>
> $ emacs -Q -batch -eval '(print (directory-files "/ssh:localhost:/sys"))'
> Tramp: Sending command ‘exec ssh -e none localhost’
> Tramp: Found remote shell prompt on ‘localhost’
>
> ("." ".." "block" "bus" "class" "dev" "devices" "firmware" "fs" "hypervisor" "kernel" "module" "power")
>
> (as expected)
>
> But:
>
> $ emacs -Q -batch -eval '(print (directory-files "/sshfs:localhost:/sys/"))'
> , Method ‘sshfs’ is not known.
> Debugger entered--Lisp error: (user-error "Method ‘sshfs’ is not known.")
>   signal(user-error ("Method ‘sshfs’ is not known."))
>   tramp-error((tramp-file-name "sshfs" nil nil "localhost" nil "/sys/" nil) user-error "Method `%s' is not known." "sshfs")
>   apply(tramp-error (tramp-file-name "sshfs" nil nil "localhost" nil "/sys/" nil) user-error "Method `%s' is not known." "sshfs")
>   tramp-user-error((tramp-file-name "sshfs" nil nil "localhost" nil "/sys/" nil) "Method `%s' is not known." "sshfs")
>   tramp-dissect-file-name("/sshfs:localhost:/sys/")
>   tramp-file-name-handler(expand-file-name "/sshfs:localhost:/sys/" nil)
>   expand-file-name("/sshfs:localhost:/sys/" nil)
>   apply(expand-file-name ("/sshfs:localhost:/sys/" nil))
>   tramp-autoload-file-name-handler(expand-file-name "/sshfs:localhost:/sys/" nil)
>   directory-files("/sshfs:localhost:/sys/")
>   (print (directory-files "/sshfs:localhost:/sys/"))
>   eval((print (directory-files "/sshfs:localhost:/sys/")) t)
>   command-line-1(("-eval" "(print (directory-files \"/sshfs:localhost:/sys/\"))"))
>   command-line()
>   normal-top-level()
>

OK, removing lisp/net/tramp-loaddefs.el and manually regenerating it
fixes the issue. So this is not a bug in the Emacs code itself. Maybe
there's a small bug in the Makefiles around detecting whether
tramp-loaddefs.el needs to be rebuilt?