From 809afde01d8265c3808e9c724b9bce09c571d5c6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 17 Sep 2022 10:10:10 +0300 Subject: [PATCH] Fix running spell-checking in remote buffers * lisp/textmodes/ispell.el (ispell-with-safe-default-directory): Don't use remote 'default-directory' when running the speller. (Bug#57649) --- lisp/textmodes/ispell.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 4b5ed98ecc9..b3fb326cf9b 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -740,7 +740,8 @@ Otherwise returns the library directory name, if that is defined." "Execute the forms in BODY with a reasonable `default-directory'." (declare (indent 0) (debug t)) `(let ((default-directory default-directory)) - (unless (file-accessible-directory-p default-directory) + (unless (and (not (file-remote-p default-directory)) + (file-accessible-directory-p default-directory)) (setq default-directory (expand-file-name "~/"))) ,@body)) -- 2.39.2