GNU bug report logs - #58503
29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Thu, 13 Oct 2022 19:27:02 UTC

Severity: normal

Found in version 29.0.50

To reply to this bug, email your comments to 58503 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58503; Package emacs. (Thu, 13 Oct 2022 19:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to miha <at> kamnitnik.top:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Oct 2022 19:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: miha <at> kamnitnik.top
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; eshell, with remote pwd, diff between folders doesn't
 create a *Diff* buffer
Date: Thu, 13 Oct 2022 21:26:09 +0200
[Message part 1 (text/plain, inline)]
Steps to reproduce:

M-x eshell
cd into a remote directory, for example 'cd /sudo::~/'
compare two existing folders with 'diff a/ b/' or 'diff -r a/ b/'

Eshell prints diff output into the *eshell* buffer instead of displaying
a *Diff* buffer. This isn't an issue in a local pwd.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58503; Package emacs. (Sat, 12 Nov 2022 20:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 58503 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: miha <at> kamnitnik.top
Cc: Michael Albinus <michael.albinus <at> gmx.de>, 58503 <at> debbugs.gnu.org
Subject: Re: bug#58503: 29.0.50; eshell, with remote pwd, diff between folders
 doesn't create a *Diff* buffer
Date: Sat, 12 Nov 2022 12:57:21 -0800
miha <at> kamnitnik.top writes:

> Steps to reproduce:
>
> M-x eshell
> cd into a remote directory, for example 'cd /sudo::~/'
> compare two existing folders with 'diff a/ b/' or 'diff -r a/ b/'
>
> Eshell prints diff output into the *eshell* buffer instead of displaying
> a *Diff* buffer. This isn't an issue in a local pwd.

Copying in Michael in case he has any comments.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58503; Package emacs. (Tue, 15 Nov 2022 20:11:01 GMT) Full text and rfc822 format available.

Message #11 received at 58503 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: miha <at> kamnitnik.top
Cc: 58503 <at> debbugs.gnu.org
Subject: Re: bug#58503: 29.0.50; eshell, with remote pwd, diff between
 folders doesn't create a *Diff* buffer
Date: Tue, 15 Nov 2022 21:09:58 +0100
miha <at> kamnitnik.top writes:

Hi,

> M-x eshell
> cd into a remote directory, for example 'cd /sudo::~/'
> compare two existing folders with 'diff a/ b/' or 'diff -r a/ b/'
>
> Eshell prints diff output into the *eshell* buffer instead of displaying
> a *Diff* buffer. This isn't an issue in a local pwd.

I fear we cannot do too much about.

"diff" in eshell calls `eshell/diff'. This calls `diff-no-select', and
this calls `diff-file-local-copy', which is in reality
`file-local-copy'. The argument of the latter is the directory "a/" (or
"b/").

`file-local-copy' is not specified for directories, just for files. So
it fails, and the error is caught in `eshell/diff'. Due to the error,
eshell replaces "diff" by "*diff", the external command, and we see the
output in the eshell buffer.

In the local case, `file-local-copy' returns nil, and `diff-no-select'
continues to work. And also the remote case works as expected, if we try
to compare two files, and not directories, because `file-local-copy'
knows what to do.

A fix would require to replace `file-local-copy' by something else in
`diff-no-select'. Wouldn't be trivial, I fear.

Another approach would be to extend `file-local-copy' to support also
directories. Also not trivial, and I don't know whether we want this.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58503; Package emacs. (Tue, 15 Nov 2022 20:12:02 GMT) Full text and rfc822 format available.

Message #14 received at 58503 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 58503 <at> debbugs.gnu.org, miha <at> kamnitnik.top
Subject: Re: bug#58503: 29.0.50; eshell, with remote pwd, diff between
 folders doesn't create a *Diff* buffer
Date: Tue, 15 Nov 2022 21:11:39 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

Hi Stefan,

> Copying in Michael in case he has any comments.

Thanks for the heads-up, somehow I missed this bug. I've analyzed in the
other message.

Best regards, Michael.




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

Previous Next


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