Subject: Re: bug#17693: 24.3.91.1; desktop-save-mode disables option -nw
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Wed, 16 Jul 2014 00:30:43 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.3.93

I applied a simple workaround. Hopefully good enough for now at least.

--- a/lisp/desktop.el	2014-07-03 23:48:24 +0000
+++ b/lisp/desktop.el	2014-07-16 04:28:42 +0000
@@ -1516,8 +1516,15 @@
         (setq command-line-args (delete key command-line-args))
         (desktop-save-mode 0)))
     (when desktop-save-mode
-      (desktop-read)
-      (setq inhibit-startup-screen t))))
+      ;; People don't expect emacs -nw, or --daemon,
+      ;; to create graphical frames (bug#17693).
+      ;; TODO perhaps there should be a separate value
+      ;; for desktop-restore-frames to control this startup behavior?
+      (let ((desktop-restore-frames (and desktop-restore-frames
+                                         initial-window-system
+                                         (not (daemonp)))))
+        (desktop-read)
+        (setq inhibit-startup-screen t)))))