GNU bug report logs - #57572
29.0.50; Tramp error with tramp-file-name-unify

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Sun, 4 Sep 2022 07:17:01 UTC

Severity: normal

Merged with 57676

Found in version 29.0.50

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 57572 <at> debbugs.gnu.org
Subject: bug#57572: 29.0.50; Tramp error with tramp-file-name-unify
Date: Sat, 10 Sep 2022 19:37:57 +0200
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> 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 <at> 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.

[Message part 2 (text/x-patch, attachment)]

This bug report was last modified 2 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.