help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Error with tramp-archive-autoload-file-name-handler


From: Michael Albinus
Subject: Re: Error with tramp-archive-autoload-file-name-handler
Date: Sun, 27 Mar 2022 10:33:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:


> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> > Does this happen with "emacs -Q"?
>> No.
>
> But evaluating this TWICE (the `add-to-list' form is from
> `tramp-register-archive-file-name-handler') does:
>
>  #+begin_src emacs-lisp
> (add-to-list 'file-name-handler-alist
>                (cons (tramp-archive-autoload-file-name-regexp)
>                      #'tramp-archive-autoload-file-name-handler))
> (file-directory-p
>  "/home/micha/software/emacs/test/lisp/net/tramp-archive-resources/foo.iso/")
>   |--> (error "Invalid handler in ‘file-name-handler-alist’")
> #+end_src
>
> Hope that helps, I still have no complete overview what is evaluated
> when and why, but I think that adding
> `tramp-archive-autoload-file-name-handler' multiple times could be
> related.

I cannot reproduce. The following works fine:

--8<---------------cut here---------------start------------->8---
$ emacs -Q -l tramp --eval "(add-to-list 'file-name-handler-alist (cons 
(tramp-archive-autoload-file-name-regexp) 
#'tramp-archive-autoload-file-name-handler))" --eval '(file-directory-p 
"/home/albinus/tmp/out.tar.xz/")'
--8<---------------cut here---------------end--------------->8---

> BTW, one difference, maybe a crucial one, between the two users is the
> value of `tramp-archive-enabled': Here I have `nil` after starting
> Emacs, the user where the problem occurs gets `t` after starting.

That makes a difference, indeed.

> Michael.

Best regards, Michael.



reply via email to

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