aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-09-15 10:02:00 +0300
committerEli Zaretskii2023-09-15 10:02:00 +0300
commit738d8543337ee01eaa889f26da473dc84f652b8a (patch)
tree5b4ec04a085911b63e948cd4cb572b36ac2b9224
parentf0a89fa1d0e5b380ecadb57052c95b31110c0323 (diff)
downloademacs-738d8543337ee01eaa889f26da473dc84f652b8a.tar.gz
emacs-738d8543337ee01eaa889f26da473dc84f652b8a.zip
Support emacsclient on Windows with server on GNU or Unix systems
* lisp/server.el (server-process-filter): If 'tty-name' is literally "CONOUT$", assume the client runs on MS-Windows and force the frame type to GUI. This allows to run emacsclient on MS-Windows when the server runs on a Posix host. (Bug#65812)
-rw-r--r--lisp/server.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 104fc060c05..1006fee5c4c 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1262,9 +1262,12 @@ The following commands are accepted by the client:
1262 ;; choice there.) In daemon mode on Windows, we can't 1262 ;; choice there.) In daemon mode on Windows, we can't
1263 ;; make tty frames, so force the frame type to GUI 1263 ;; make tty frames, so force the frame type to GUI
1264 ;; there too. 1264 ;; there too.
1265 (when (and (eq system-type 'windows-nt) 1265 (when (or (and (eq system-type 'windows-nt)
1266 (or (daemonp) 1266 (or (daemonp)
1267 (eq window-system 'w32))) 1267 (eq window-system 'w32)))
1268 ;; Client runs on Windows, but the server
1269 ;; runs on a Posix host.
1270 (equal tty-name "CONOUT$"))
1268 (push "-window-system" args-left))) 1271 (push "-window-system" args-left)))
1269 1272
1270 ;; -position +LINE[:COLUMN]: Set point to the given 1273 ;; -position +LINE[:COLUMN]: Set point to the given