Subject: Re: bug#74352: 29.4; emerge-files with tramp + local file fails

From: Michael Albinus <[email-masked]>
Date: Thu, 14 Nov 2024 09:10:53 +0100

Jörg Sommer <[email-masked]> writes:

> Hi,

Hi Joerg,

> when running `emerge-files` with `/ssh:remote:file` and `~/local-file` I get
> the buffer `*emerge-diff-errors*` with:
>
> ```
> diff: /tmp/tramp.wlcRNL: No such file or directory
> diff: /home/joerg/local-file: No such file or directory
> ```

Thanks for the report. There is also bug#6850 about the same topic, I've
merged both.

> This change solves the problem:
>
> ```diff
> diff --git lisp/vc/emerge.el lisp/vc/emerge.el
> index ca48f2f3c7b..562041e4232 100644
> --- lisp/vc/emerge.el
> +++ lisp/vc/emerge.el
> @@ -581,6 +581,7 @@ emerge-make-diff-list
>    (setq emerge-diff-buffer (get-buffer-create "*emerge-diff*"))
>    (with-current-buffer
>        emerge-diff-buffer
> +    (setq default-directory (file-name-directory file-A))
>      (erase-buffer)
>      (shell-command
>       (format "%s %s %s %s"
> ```

Unfortunately, nobody felt comfortable to work on this over the
years. I'll take the stab, and check your patch next days. So we should
fix this after so many years.

> Regards Jörg

Thanks for the heads-up, and best regards, Michael.