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

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

bug#57676: 29.0.50; Tramp: Unable to close vterm buffer with remote defa


From: James Ferguson
Subject: bug#57676: 29.0.50; Tramp: Unable to close vterm buffer with remote default-directory
Date: Sat, 10 Sep 2022 16:50:34 -0400

I can confirm the latest build no longer causes me that problem.

It's not vterm's fault, it's mine.  I set `default-directory` like that when spawning it, which I have just been getting away with for a long time.  It seems up until now a lot of things have been tolerant of my invalid local path, with empty, '.' or './' seemingly being treated like '~' before now.

So I'll be fixing my code that created a badly formed default-directory as well.

Thank you for your efforts!  I'm very glad to see Tramp is getting some attention.  I love it and rely on it but it adds a lot of latency for me with its extensive round trips when establishing connections (I have to ssh via an AWS jumphost).





On Sat, Sep 10, 2022 at 7:49 AM Michael Albinus <michael.albinus@gmx.de> wrote:
James Ferguson <james@faff.org> writes:

Hi James,

> That's definitely what raises the error, though the comment implies to
> me that it's unexpected/undesirable that it is triggered.

Indeed. Your backtrace from the original report shows

> Debugger entered--Lisp error: (file-error "File ‘.’ must be absolute")
>   signal(file-error ("File ‘.’ must be absolute"))
>   tramp-error((tramp-file-name "sshx" nil nil "4x02" nil "." nil) file-error "File `%s' must be absolute" ".")
>   tramp-file-name-unify((tramp-file-name "sshx" nil nil "4x02" nil "." nil) ".")
>   tramp-get-file-property((tramp-file-name "sshx" nil nil "4x02" nil "." nil) "." "file-truename")
>   tramp-flush-file-properties((tramp-file-name "sshx" nil nil "4x02" nil "." nil) ".")
>   tramp-flush-file-function()
>   kill-buffer(#<buffer Terminal-4x02 volta@4x02 (10.0.154.60) - byobu>)

We see, that `tramp-flush-file-properties' is called with
`default-directory' "." in #<buffer Terminal-4x02 volta@4x02 (10.0.154.60) - byobu>

This is obviously an error, because the docstring of `default-directory'
says

--8<---------------cut here---------------start------------->8---
Name of default directory of current buffer.
It should be an absolute directory name; on GNU and Unix systems,
these names start with ‘/’ or ‘~’ and end with ‘/’.
--8<---------------cut here---------------end--------------->8---

Perhaps you could report this to the maintainer of vterm.

For the time being, I've pushed a fix to Emacs master which expands
`default-directory' inside `tramp-flush-file-properties'. Could you,
pls, check?

Best regards, Michael.

reply via email to

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