Subject: bug#72849: [PATCH] Keep project's exec-path during with-temp-buffer call

From: Michael Albinus <[email-masked]>
Date: Wed, 28 Aug 2024 09:12:28 +0200

Evgenii Klimov via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

Hi Evgenii,

> I see that this function tries to be remote-host friendly (uses
> `process-file') so I tried to ensure that this patch doesn't break this
> effort, but I'm not sure that I understand the machinery behind TRAMP
> correctly.  So please consider this aspect from your side.
>
> This patch shouldn't interfere with TRAMP, if I understand
> `process-file`s doc correctly:
>
>      If a file name handler is invoked, it determines the program to run
>      based on the first argument PROGRAM.  For instance, suppose that a
>      handler for remote files is invoked.  Then the path that is used
>      for searching for the program might be different from ‘exec-path’.

Correct. Remote processes do not use the variable exec-path, so you can
change it at will, w/o breaking remote processes. Of course, exec-path
should still ensure that local programs, needed for accessing a remote
host (like ssh), shall still be usable.

Best regards, Michael.