unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jun Hao <jun_hao@aol.com>
To: 17693@debbugs.gnu.org
Subject: bug#17693: PATCH
Date: Fri, 20 May 2016 00:23:32 +0800	[thread overview]
Message-ID: <m2d1oit3sr.fsf@aol.com> (raw)
In-Reply-To: <68748658-E1E0-4EED-B18E-3A1A49925127@automata.se>

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

Hi,

Please see the simple patch in the attachment. I can still repro this
issue with latest dev branch. I think the original workaround is not
working since the repro step is using -q which doesn't set
after-init-hook. Let me know if this fix the issue

-- 
Thanks - Jun

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-desktop.el-Disable-restore-frameset-if-in-non-g.patch --]
[-- Type: text/x-patch, Size: 1778 bytes --]

From 4fce83e29ef772b61be276cdaf3e7b12088b417c Mon Sep 17 00:00:00 2001
From: Jun Hao <jun_hao@aol.com>
Date: Fri, 20 May 2016 00:05:25 +0800
Subject: [PATCH] * lisp/desktop.el: Disable restore frameset if in non-graphic
 display.

Fixes: debbugs:17693
---
 lisp/desktop.el | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/lisp/desktop.el b/lisp/desktop.el
index 822db05..dba3277 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1163,7 +1163,7 @@ This function also sets `desktop-dirname' to nil."
   "Restore the state of a set of frames.
 This function depends on the value of `desktop-saved-frameset'
 being set (usually, by reading it from the desktop)."
-  (when (desktop-restoring-frameset-p)
+  (when (and (display-graphic-p) (desktop-restoring-frameset-p))
     (frameset-restore desktop-saved-frameset
 		      :reuse-frames (eq desktop-restore-reuses-frames t)
 		      :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))
@@ -1634,15 +1634,8 @@ If there are no buffers left to create, kill the timer."
         (setq command-line-args (delete key command-line-args))
         (desktop-save-mode 0)))
     (when desktop-save-mode
-      ;; 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)))))
+      (desktop-read)
+      (setq inhibit-startup-screen t))))
 
 (provide 'desktop)
 
-- 
2.8.2


  parent reply	other threads:[~2016-05-19 16:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 18:34 bug#17693: 24.3.91.1; desktop-save-mode disables option -nw Stefan Guath
2014-06-04 21:18 ` Juanma Barranquero
2014-06-05  7:00   ` Stefan Guath
2014-06-05  7:02     ` Juanma Barranquero
2014-06-05  7:05       ` Stefan Guath
2014-06-05  7:12         ` Juanma Barranquero
2014-06-22  7:11           ` Glenn Morris
2014-07-07  0:11             ` Glenn Morris
2014-07-16  4:30               ` Glenn Morris
2015-04-08 14:55 ` bug#17693: This bug is not resolved Jordon Biondo
2015-04-08 15:10   ` Jordon Biondo
2016-04-02 13:41     ` Eli Zaretskii
2016-05-19 16:23 ` Jun Hao [this message]
2016-05-21 19:40 ` bug#17693: 24.3.91.1; desktop-save-mode disables option -nw Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2d1oit3sr.fsf@aol.com \
    --to=jun_hao@aol.com \
    --cc=17693@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).