From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Ferguson Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87tu5i101v.fsf@gnus.org> <87leqrwitz.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000013615905e858d1a3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57676@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 22:51:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oX7RY-0007o4-DY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 22:51:12 +0200 Original-Received: from localhost ([::1]:49546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX7RX-0005O4-En for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 16:51:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX7RO-0005Nv-Rc for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 16:51:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX7RO-0007bK-9d for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oX7RN-0004eE-MI for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 16:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James Ferguson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 20:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57676 X-GNU-PR-Package: emacs Original-Received: via spool by 57676-submit@debbugs.gnu.org id=B57676.166284305817857 (code B ref 57676); Sat, 10 Sep 2022 20:51:01 +0000 Original-Received: (at 57676) by debbugs.gnu.org; 10 Sep 2022 20:50:58 +0000 Original-Received: from localhost ([127.0.0.1]:40444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX7RJ-0004dw-Ar for submit@debbugs.gnu.org; Sat, 10 Sep 2022 16:50:58 -0400 Original-Received: from mail-ed1-f49.google.com ([209.85.208.49]:36726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oX7RE-0004df-3Q for 57676@debbugs.gnu.org; Sat, 10 Sep 2022 16:50:55 -0400 Original-Received: by mail-ed1-f49.google.com with SMTP id e18so7451734edj.3 for <57676@debbugs.gnu.org>; Sat, 10 Sep 2022 13:50:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=cNGQ/J8NFCewamprHcQQorgaAgzurqqTnBkt9usNKr0=; b=N13iILSK+tqlHx26eap0vekhaBpFu3iOKE51WyBYKpObTt7hjSFPRWhTrPwMmo/SCZ uu+KpYNRSOVK6O4AxxC7Ur+FYUv1WHd3REyXOWxzD0P2Kbw5Km20RN3Y/qu6+VYHk7qM hdjvhCW0iFa77iG2vJEk0ZGUHUWJUKFyKzcK4zSpMbNq5oAYQSqTOOWvcmQsSTT4C+ND Xkp5SLo10JjIKV1iCibhSajgbL/e6LvIhDe1XjEJXQREtzVGNUTut6Uanb1jBQCjtOMN soziMmh1NiJTCUfT+gSdGij+ThxfWAdLadiwcW9rbaZPEUqE5V2m/z0K+bdDv9M6KY8u HzwQ== X-Gm-Message-State: ACgBeo03ObQsmn+pkLRB0cNHsHCiOtGXYXZcdDBRgVCJD4HYgjqI2+Sx MfazdsSIwPac6g++8Ecn+G8p9CBuhDmIYmZbqJA= X-Google-Smtp-Source: AA6agR5reHA8xPIWxYtCe5jTJ8WUkglpirfehsQ05cPfDjYPfTzR7NYzQbe+8KiYrSe40+etoEZUVutHIgq9TqpMS4w= X-Received: by 2002:a05:6402:3215:b0:451:4ce5:d7b8 with SMTP id g21-20020a056402321500b004514ce5d7b8mr3629411eda.223.1662843046026; Sat, 10 Sep 2022 13:50:46 -0700 (PDT) In-Reply-To: <87leqrwitz.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242120 Archived-At: --00000000000013615905e858d1a3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 wrote: > James Ferguson 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 =E2=80=98.=E2=80=99 mus= t be absolute") > > signal(file-error ("File =E2=80=98.=E2=80=99 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" ni= l > "." nil) ".") > > tramp-flush-file-function() > > kill-buffer(#) > > We see, that `tramp-flush-file-properties' is called with > `default-directory' "." in # (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 =E2=80=98/=E2=80=99 or =E2=80=98~=E2=80=99 and end= with =E2=80=98/=E2=80=99. > --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. > --00000000000013615905e858d1a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I can confirm the latest build no longer c= auses me that problem.

It's not vterm'= s fault, it's mine.=C2=A0 I set `default-directory` like that when spaw= ning it, which I have just been getting away with for a long time.=C2=A0 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!=C2=A0 I'm very glad to see Tra= mp is getting some attention.=C2=A0 I love it and rely on it but it adds a = lot of latency for me with its extensive round trips when establishing conn= ections (I have to ssh via an AWS jumphost).

<= br>



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

Hi James,

> That's definitely what raises the error, though the comment implie= s 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 =E2=80=98.=E2=80= =99 must be absolute")
>=C2=A0 =C2=A0signal(file-error ("File =E2=80=98.=E2=80=99 must be = absolute"))
>=C2=A0 =C2=A0tramp-error((tramp-file-name "sshx" nil nil &quo= t;4x02" nil "." nil) file-error "File `%s' must be = absolute" ".")
>=C2=A0 =C2=A0tramp-file-name-unify((tramp-file-name "sshx" ni= l nil "4x02" nil "." nil) ".")
>=C2=A0 =C2=A0tramp-get-file-property((tramp-file-name "sshx" = nil nil "4x02" nil "." nil) "." "file-tr= uename")
>=C2=A0 =C2=A0tramp-flush-file-properties((tramp-file-name "sshx&qu= ot; nil nil "4x02" nil "." nil) ".")
>=C2=A0 =C2=A0tramp-flush-file-function()
>=C2=A0 =C2=A0kill-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@4x= 02 (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 =E2=80=98/=E2=80=99 or =E2=80=98~=E2=80=99 and end w= ith =E2=80=98/=E2=80=99.
--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.
--00000000000013615905e858d1a3--