emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#17693: closed (24.3.91.1; desktop-save-mode disabl


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17693: closed (24.3.91.1; desktop-save-mode disables option -nw)
Date: Wed, 16 Jul 2014 04:31:02 +0000

Your message dated Wed, 16 Jul 2014 00:30:43 -0400
with message-id <address@hidden>
and subject line Re: bug#17693: 24.3.91.1; desktop-save-mode disables option -nw
has caused the debbugs.gnu.org bug report #17693,
regarding 24.3.91.1; desktop-save-mode disables option -nw
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17693: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17693
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.91.1; desktop-save-mode disables option -nw Date: Wed, 4 Jun 2014 20:34:11 +0200
VERSION:
GNU Emacs 24.3.91.1 (x86_64-apple-darwin13.2.0, NS apple-appkit-1265.20) of 
2014-05-23 on angelofdeaths-MacBook-Air.local

TO REPRODUCE BUG:

In OS X 10.9.3:
1) Create a .emacs file with only one expression:
    (desktop-save-mode)
2) Start emacs in graphical mode (i.e. double-click on Emacs.app icon).
3) Quit emacs, and answer "y" on question "Save desktop? (y or n)". The file 
.emacs.desktop is now created.
4) Run 'emacs -nw' in terminal.
5) Despite the '-nw' option, Emacs is now opened in graphical mode in a new 
non-terminal window.




--- End Message ---
--- Begin Message --- Subject: Re: bug#17693: 24.3.91.1; desktop-save-mode disables option -nw Date: Wed, 16 Jul 2014 00:30:43 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
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)))))
 


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]