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: Mon, 28 Mar 2022 12:25:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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

Hi,

> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> Michael Albinus <michael.albinus@gmx.de> writes:
>>
>>> I cannot reproduce. The following works fine:
>>>
>>> […]
>>
>> You missed the TWICE part in my last message.  Just eval the above
>> twice:
>>
>> $ 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/")'\
>>                     --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/")'
>>
>> Sorry, but that's the best recipe I can offer.  And I guess something
>> like this is actually happening.  AFAIU, Tramp can call
>> `tramp-register-archive-file-name-handler' several times - see
>> tramp-archive.el line 394:
>
> With Emacs 27.1, I ran the test in the attached script a couple of times
> and could *not* reproduce your error.

Same here, I cannot reproduce it with Emacs 27, Emacs 28, Emacs 29. Btw,
I believe a more realistic check would be

--8<---------------cut here---------------start------------->8---
$ emacs -Q -f tramp-register-archive-file-name-handler --eval 
'(file-directory-p "/home/albinus/tmp/out.tar.xz/")'\
           -f tramp-register-archive-file-name-handler --eval 
'(file-directory-p "/home/albinus/tmp/out.tar.xz/")'
--8<---------------cut here---------------end--------------->8---

It is tramp-register-archive-file-name-handler which might be invoked
several times, and which causes the problem. Could *you* (Michael)
reproduce the problem with this recipe?

Anyway, I've pushed the appended patch to the repositories. It should fix
this problem, hopefully.

Best regards, Michael.

Attachment: txtQ7mY8ySo_h.txt
Description: Text Data


reply via email to

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