On Tue, 27 Oct 2026, Michael Albinus wrote:

> I don't know magit at all, so it might be dumb what I'm saying. However,
> there is
>
> (defmacro magit--with-temp-process-buffer (&rest body)
>   "Like `with-temp-buffer', but always propagate `process-environment'.
> When that var is buffer-local in the calling buffer, it is not
> propagated by `with-temp-buffer', so we explicitly ensure that
> happens, so that processes will be invoked consistently.  BODY is
> as for that macro."
>   (declare (indent 0) (debug (body)))
>   (let ((p (gensym)))
>     `(let ((,p process-environment))
>        (with-temp-buffer
>          (setq-local process-environment ,p)
>          ,@body))))

On the same vein as the aforementioned bug#81175, I'd say the correct
version of that macro should read

(let ((,p (or (ignore-error void-variable
                (buffer-local-toplevel-value 'process-environment))
              (default-toplevel-value 'process-environment))))
   ...)

> Best regards, Michael.

Reply via email to