From 2cbaea25540dbf0756cf5c601214dace66f3f62a Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Tue, 19 Aug 2025 12:46:36 -0700 Subject: [PATCH] emacs: allow spaces in TERMINAL --- home/develop/emacs/custom.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/develop/emacs/custom.el b/home/develop/emacs/custom.el index f2cdba8..7aa618b 100644 --- a/home/develop/emacs/custom.el +++ b/home/develop/emacs/custom.el @@ -964,7 +964,11 @@ frame if FRAME is nil, and to 1 if AMT is nil." (interactive) (if (file-remote-p default-directory) (shell) - (start-process "terminal" nil (getenv "TERMINAL")))) + (let ((terminal-cmd (getenv "TERMINAL"))) + (when terminal-cmd + ;; Split the command properly, handling spaces in paths + (let ((args (split-string-and-unquote terminal-cmd))) + (apply 'start-process "terminal" nil args)))))) ;; ----------------------------------------------------------------------------- ;; --- Compilation