unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Felix Dietrich <felix.dietrich@sperrhaken.name>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Error with tramp-archive-autoload-file-name-handler
Date: Wed, 06 Apr 2022 20:13:03 +0200	[thread overview]
Message-ID: <87y20igjww.fsf@gmx.de> (raw)
In-Reply-To: <87lewiy4t5.fsf@sperrhaken.name> (Felix Dietrich's message of "Wed, 06 Apr 2022 10:49:42 +0200")

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	other threads:[~2022-04-06 18:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 23:44 Error with tramp-archive-autoload-file-name-handler Michael Heerdegen
2022-03-26  8:39 ` Michael Albinus
2022-03-26 19:01   ` Michael Heerdegen
2022-03-27  0:06     ` Michael Heerdegen
2022-03-27  8:33       ` Michael Albinus
2022-03-28  2:20         ` Michael Heerdegen
2022-03-28  6:08           ` Felix Dietrich
2022-03-28 10:25             ` Michael Albinus
2022-03-29  0:17               ` Michael Heerdegen
2022-03-29  7:30                 ` Michael Albinus
2022-04-01  1:53                   ` Michael Heerdegen
2022-04-02 12:00                     ` Felix Dietrich
2022-04-02 17:00                       ` Michael Albinus
2022-04-06  8:49                         ` Felix Dietrich
2022-04-06 18:13                           ` Michael Albinus [this message]
2022-04-07 10:14                             ` Michael Albinus
2022-04-07 17:54                               ` Felix Dietrich
2022-04-08  9:41                                 ` Michael Albinus
2022-04-13  2:03                                 ` Michael Heerdegen
2022-04-03  1:26                       ` Michael Heerdegen
2022-04-03 15:57                         ` Michael Albinus
2022-04-04  0:58                           ` Michael Heerdegen
2022-04-04  7:40                             ` Michael Albinus
2022-03-29  0:09             ` Michael Heerdegen
2022-03-27  8:16     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y20igjww.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=felix.dietrich@sperrhaken.name \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).