From: Michael Albinus Date: Sat, 2 Jul 2022 11:19:04 +0000 (+0200) Subject: Preserve connection-local settings in dired X-Git-Tag: emacs-29.0.90~1447^2~1276 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5aec9b10d709b91a0188b705b653bd2a59fff2d;p=emacs.git Preserve connection-local settings in dired * lisp/dired-aux.el (dired-shell-command): Preserve connection-local settings. (Bug#56333) --- 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