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

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

bug#57572: 29.0.50; Tramp error with tramp-file-name-unify


From: Michael Albinus
Subject: bug#57572: 29.0.50; Tramp error with tramp-file-name-unify
Date: Sat, 10 Sep 2022 19:37:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Thierry Volpiatto <thievol@posteo.net> writes:

Hi Thierry,

>> So I've added `expand-file-name' to even more places in Tramp in the
>> hope, that it fits now for all cases. Pushed to master, could you please
>> check?
>
> I am using for now the emacs-28 version of tramp-file-name-unify to
> prevent this error (it is inlined), to reproduce the bug with
> helm-find-files you have to use:
>
> (setq helm-ff--file-accessible-directory-p-fn
> #'file-accessible-directory-p)

The version w/o a check will work most of the cases, because the vast
majority of file name cache calls use already absolute file names. But
there have been wrong cache data sporadically, that's why I have changed
to require absolute file names, after I could debug it to the reason (it
was a long way to trap it).

> And I still have the error, here the backtrace, the tramp log at the end
> of this message:
>
> Debugger entered--Lisp error: (file-error "File `' must be absolute, please 
> report a bug!")
>   signal(file-error ("File `' must be absolute, please report a bug!"))
>   tramp-error((tramp-file-name "sudo" "root" nil "IPad-S340" nil "" nil) 
> file-error "File `%s' must be absolute, please report a bug!" "")
>   tramp-file-name-unify((tramp-file-name "sudo" "root" nil "IPad-S340" nil "" 
> nil) "")
>   tramp-get-file-property((tramp-file-name "sudo" "root" nil "IPad-S340" nil 
> "" nil) "" "file-readable-p" undef)
>   tramp-sh-handle-file-readable-p("/sudo:root@IPad-S340:")

Hmm. Due to my patch, `tramp-sh-handle-file-readable-p' calls definitely
`expand-file-name', before it consults the cache via
`tramp-get-file-property'.

But wait, you are in file name completion. So I guess you have bound
`non-essential' to t. In that case, `expand-file-name' expands only, if
the connection is established already.

That means the Tramp file name cache is useless, when the connection is
not established yet, or if `non-essential' is non-nil.

Could you pls check whether the appended patch works for you?

> Thanks.

Attachment: txtt23KVUE1XN.txt
Description: Text Data


reply via email to

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