From b16b4d730e0535484393aa8c01744fc609e61d92 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 22 Jun 2021 15:21:33 +0200 Subject: [PATCH] =?utf8?q?If=20the=20daemon=E2=80=99s=20TTY=20is=20our=20o?= =?utf8?q?nly=20frame,=20create=20a=20new=20frame?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * server.el (server-process-filter): If there won't be a current frame to use, fall back to trying to create a new one (bug#11033). --- lisp/server.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/server.el b/lisp/server.el index 3205ba182ee..ac5db197f3e 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1308,7 +1308,17 @@ The following commands are accepted by the client: frame-parameters)) ;; When resuming on a tty, tty-name is nil. (tty-name - (server-create-tty-frame tty-name tty-type proc)))) + (server-create-tty-frame tty-name tty-type proc)) + + ;; If there won't be a current frame to use, fall + ;; back to trying to create a new one. + ((and use-current-frame + (daemonp) + (null (cdr (frame-list))) + (eq (selected-frame) terminal-frame) + display) + (setq tty-name nil tty-type nil) + (server-select-display display)))) (process-put proc 'continuation -- 2.39.2