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

Full log


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.




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

Previous Next


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