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: Wed, 06 Apr 2022 20:13:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Felix Dietrich <felix.dietrich@sperrhaken.name> writes:

Hi Felix,

>>>> 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.

tramp-archive-autoload-file-name-handler is a function with a very short
life time. It is supposed to be called only once, and it shall disappear
afterwards. So I don't believe it is worth to be extended too much with
error handling.

>> 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.

First of all, many thanks you've analyzed this in deep detail! Not so
many people do this with Tramp.

> At a quick glance, this commit changed the implementation of
> ‘tramp-archive-autload-file-name-handler’ and might be missing an
> else-form.  This causes the autoload handler to return nil when
> ‘tramp-archive-enabled’ is nil, and, at a slightly longer glance, for
> some file name handlers this is wrong and an error.  The attached patch
> changes ‘tramp-archive-autoload-file-name-handler’ to always call
> ‘tramp-autoload-file-name-handler’, setting ‘tramp-archive-autoload’
> appropriately.

Yes, this works, thanks.

> This may cause a regression, though, of bug #48476 [3]
> (“Emacs hangs with 100% cpu if started within a current directory that
> has a name ending with ".tar"”).  I have not tested that or spent time
> on understanding that bug.  Maybe you still remember enough details of
> the bug to judge this.

I've shortly tested the recipe given in that bug, and everything seems
to be OK with your patch. I will apply your patch in your name to the
emacs-28 branch, after I have merged it with other pending Tramp
patches. Likely tomorrow. Perhaps you could provide a ChangeLog-style
commit message?

> Now, why is it a problem to add
> ‘tramp-archive-autoload-file-name-handler’ to ‘file-name-handler-alist’
> if ‘tramp-archive-file-name-handler’ is already there?  Why does the
> following snipped still fail even though
> ‘tramp-archive-file-name-handler’ comes first in the handler alist?

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?

Best regards, Michael.



reply via email to

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