Subject: Re: bug#57556: 28.1; Eshell not finding executables in PATH when tramp-integration loaded

From: Michael Albinus <[email-masked]>
Date: Mon, 10 Oct 2022 11:15:53 +0200

Jim Porter <[email-masked]> writes:

Hi Jim,

Thinking about, I believe the following would suffice (untested):

--8<---------------cut here---------------start------------->8---
(defmacro with-connection-local-application-variables (application &rest body)
  "Apply connection-local variables for APPLICATION in `default-directory'.
Execute BODY, and unwind connection-local variables.

This is just `with-connection-local-variables', plus the ability
to set an application."
  (declare (debug t) (indent 1))
  `(let ((connection-local-default-application ,application))
    (with-connection-local-variables-1 (lambda () ,@body))))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.