[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: |
Fri, 08 Apr 2022 11:41:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Felix Dietrich <felix.dietrich@sperrhaken.name> writes:
> Hi Michael,
Hi Felix,
> Hm, I had wanted to add that now ‘tramp-autoload-file-name-handler’ and
> ‘tramp-archive-autoload-file-name-handler’ look nearly the same, and
> that a nicer solution would be to revert the changes of 4db69b32b8 (“Fix
> bug#48476”) to tramp-archive.el and make the archive autoload handler an
> alias again to ‘tramp-autoload-file-name-handler’ as well as changing
> the latter to use ‘tramp-archive-enabled’ directly instead of via
> ‘tramp-archive-autoload’. Interestingly, this does not work (almost
> sent it without testing): it causes a similar issue as bug #48476 with
> an error message “Recursive load” (no hang due to an infinite loop
> though). Do you remember why using ‘defalias’ here causes an infinite
> recursion?
Not really. I guess it is because this function was called twice
(replacing tramp-autoload-file-name-handler and
tramp-archive-autoload-file-name-handler in file-name-handler-alist),
which results in infinite recursion.
> The attached patch shows the erroneous changes described above. Here
> the steps from bug #48476 to reproduce the issue:
>
> mkdir foo.tar
> cd foo.tar
> emacs
This case is already handled in tramp-archive-test45-auto-load (emacs-28
branch) resp tramp-archive-test47-auto-load (master branch). I've
extended it slightly in the emacs-28 branch in order to test also the
case tramp-archive-enabled is nil, should arrive in master branch after
next merge.
. If you like you could play with this test case, perhaps more tests
could be applied (for example existence of
tramp-archive-autoload-file-name-handler and
tramp-archive-file-name-handler in file-name-handler-alist).
> I also forced ‘tramp-gvfs-enabled’ to t because its checks do not seem
> to take the DBUS_SESSION_BUS_ADDRESS environment variable into account
> (which was set by dbus-run-session). Maybe this had a negative
> influence.
This could also be tested.
>> With my previous patch, this shouldn't happen
>> anymore. Both tramp-archive-autoload-file-name-handler and
>> tramp-archive-file-name-handler shouldn't coexist in
>> file-name-handler-alist. Do you still see this after your patch has been
>> applied?
>
> I havenʼt looked particular hard, but no, I do not see both the autoload
> and the normal handler in the ‘file-name-handler-alist’ at the same time
> after a normal start and load of tramp – well, if I donʼt put them there
> myself, that is. My intention with this part was to show the issue I
> described was connected to and indeed the cause for the problem Michael
> Heerdegen had encountered, and also just to provide further details (I
> was really confused about the example in that part for quite a while).
Yes, thanks! But I believe we don't need to care further this.
Best regards, Michael.
Re: Error with tramp-archive-autoload-file-name-handler, Michael Heerdegen, 2022/04/02