From: Peter Oliver Date: Tue, 22 Jun 2021 13:21:33 +0000 (+0200) Subject: If the daemon’s TTY is our only frame, create a new frame X-Git-Tag: emacs-28.0.90~2058 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b16b4d730e0535484393aa8c01744fc609e61d92;p=emacs.git If the daemon’s TTY is our only frame, create a new frame * 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). --- 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