all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer
@ 2022-10-13 19:26 miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-11-12 20:57 ` Stefan Kangas
  2022-11-15 20:09 ` Michael Albinus
  0 siblings, 2 replies; 4+ messages in thread
From: miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-13 19:26 UTC (permalink / raw)
  To: 58503

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer
  2022-10-13 19:26 bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-11-12 20:57 ` Stefan Kangas
  2022-11-15 20:11   ` Michael Albinus
  2022-11-15 20:09 ` Michael Albinus
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2022-11-12 20:57 UTC (permalink / raw)
  To: miha; +Cc: Michael Albinus, 58503

miha@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer
  2022-10-13 19:26 bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-11-12 20:57 ` Stefan Kangas
@ 2022-11-15 20:09 ` Michael Albinus
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2022-11-15 20:09 UTC (permalink / raw)
  To: miha; +Cc: 58503

miha@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer
  2022-11-12 20:57 ` Stefan Kangas
@ 2022-11-15 20:11   ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2022-11-15 20:11 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 58503, miha

Stefan Kangas <stefankangas@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-15 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 19:26 bug#58503: 29.0.50; eshell, with remote pwd, diff between folders doesn't create a *Diff* buffer miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-12 20:57 ` Stefan Kangas
2022-11-15 20:11   ` Michael Albinus
2022-11-15 20:09 ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.