Michael Albinus writes: > Felix Dietrich writes: > >>> Anyway, when `tramp-archive-autoload-file-name-handler' is present after >>> tramp-archive-enabled has become nil, it is used and called but doesn't >>> handle the request (i.e. returns nil). AFAIU, that was what I have been >>> seeing. >> >> Could the tramp error handler provide a more helpful error message Oh, I meant “tramp file handler” here instead of “tramp error handler” – although I had made wrong assumptions; therefore, this is irrelevant. > Since this bug is fixed now, I don't believe it is worthful to invest > more code there. I am *not* convinced that the reason for this bug has been correctly identified. After spending some more time with it, I have come up with the following test case with which I am now able to produce the error reliably with revision a5841b196f [1] (that is your patch): #+begin_src emacs-lisp (let* ((emacs-repo "~/src/emacs/") (foo.iso (concat (file-name-as-directory emacs-repo) "test/lisp/net/tramp-archive-resources/foo.iso/"))) (load "tramp-archive") (let ((file-name-handler-alist (list (cons (tramp-archive-autoload-file-name-regexp) #'tramp-archive-autoload-file-name-handler))) (tramp-archive-enabled nil)) (file-directory-p foo.iso)))) #+end_src With Emacs 27.1, however, I was not able to reproduce the issue. Therefore, I used “git bisect” between the tag “emacs-27.1” and your commit a5841b196f with the attached script to find the offending commit introducing the issue: 4db69b32b8 (“Fix bug#48476”) [2].