From c5aec9b10d709b91a0188b705b653bd2a59fff2d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 2 Jul 2022 13:19:04 +0200 Subject: [PATCH] Preserve connection-local settings in dired * lisp/dired-aux.el (dired-shell-command): Preserve connection-local settings. (Bug#56333) --- lisp/dired-aux.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 095f8001701..c403cc5cbde 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1056,18 +1056,19 @@ Return the result of `process-file' - zero for success." (dir default-directory)) (with-current-buffer (get-buffer-create out-buffer) (erase-buffer) - (let* ((default-directory dir) - (res (process-file - shell-file-name - nil - t - nil - shell-command-switch - cmd))) - (dired-uncache dir) - (unless (zerop res) - (pop-to-buffer out-buffer)) - res)))) + (let ((default-directory dir) res) + (with-connection-local-variables + (setq res (process-file + shell-file-name + nil + t + nil + shell-command-switch + cmd)) + (dired-uncache dir) + (unless (zerop res) + (pop-to-buffer out-buffer)) + res))))) ;;; Commands that delete or redisplay part of the dired buffer -- 2.39.2