From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jun Hao Newsgroups: gmane.emacs.bugs Subject: bug#17693: PATCH Date: Fri, 20 May 2016 00:23:32 +0800 Message-ID: References: <68748658-E1E0-4EED-B18E-3A1A49925127@automata.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1463675064 13951 80.91.229.3 (19 May 2016 16:24:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 May 2016 16:24:24 +0000 (UTC) To: 17693@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 19 18:24:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b3Qk9-0000wW-B4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 May 2016 18:24:13 +0200 Original-Received: from localhost ([::1]:51312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Qk8-0003d3-He for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 May 2016 12:24:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Qk2-0003cS-Tq for bug-gnu-emacs@gnu.org; Thu, 19 May 2016 12:24:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3Qjy-0001Ku-N8 for bug-gnu-emacs@gnu.org; Thu, 19 May 2016 12:24:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Qjy-0001Kq-It for bug-gnu-emacs@gnu.org; Thu, 19 May 2016 12:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b3Qjy-0006FX-Cd for bug-gnu-emacs@gnu.org; Thu, 19 May 2016 12:24:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <68748658-E1E0-4EED-B18E-3A1A49925127@automata.se> Resent-From: Jun Hao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2016 16:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17693 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17693-submit@debbugs.gnu.org id=B17693.146367503024004 (code B ref 17693); Thu, 19 May 2016 16:24:02 +0000 Original-Received: (at 17693) by debbugs.gnu.org; 19 May 2016 16:23:50 +0000 Original-Received: from localhost ([127.0.0.1]:58266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b3Qjm-0006F5-Fj for submit@debbugs.gnu.org; Thu, 19 May 2016 12:23:50 -0400 Original-Received: from omr-m008e.mx.aol.com ([204.29.186.7]:54538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b3Qjk-0006Eq-LU for 17693@debbugs.gnu.org; Thu, 19 May 2016 12:23:49 -0400 Original-Received: from mtaout-mbc02.mx.aol.com (mtaout-mbc02.mx.aol.com [172.26.221.142]) by omr-m008e.mx.aol.com (Outbound Mail Relay) with ESMTP id 60DC43800078 for <17693@debbugs.gnu.org>; Thu, 19 May 2016 12:23:43 -0400 (EDT) Original-Received: from bogon (unknown [221.218.216.191]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mtaout-mbc02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id B95063800009D for <17693@debbugs.gnu.org>; Thu, 19 May 2016 12:23:40 -0400 (EDT) User-agent: mu4e 0.9.17; emacs 25.1.50.1 x-aol-global-disposition: G X-AOL-VSS-INFO: 5800.7501/109896 X-AOL-VSS-CODE: clean DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com; s=20150623; t=1463675023; bh=xsV2mCaEWruMl8u6tbN58fa8M12wVT1CxuJTKwclYFY=; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type; b=ZJ0m4oi6Hzq1q4muA/o82qlICmKLVhHuthhqvE4H+THqnWigETAjVVhC7G4kkD2/l JovOisRjziHfZeSgTLD8Hu4htIuO0h5tFEUCcCbGgXpafxlQ+cbbLvonDConpmXq/0 Lp6QicFonDJoPI2At52Wr5/KmkJaM+2TcqFMbot4= x-aol-sid: 3039ac1add8e573de88c5030 X-AOL-IP: 221.218.216.191 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118456 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-desktop.el-Disable-restore-frameset-if-in-non-g.patch >From 4fce83e29ef772b61be276cdaf3e7b12088b417c Mon Sep 17 00:00:00 2001 From: Jun Hao 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 --=-=-=--