From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24298: Acknowledgement (25.1; problem with restoring desktop) Date: Sat, 17 Dec 2016 15:11:59 +0200 Message-ID: <83fulm7l9c.fsf@gnu.org> References: <83oa0rlnmw.fsf@gnu.org> <83pokzg944.fsf@gnu.org> <83mvg3g4wi.fsf@gnu.org> <83h96bfzgz.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481980393 23835 195.159.176.226 (17 Dec 2016 13:13:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2016 13:13:13 +0000 (UTC) Cc: 24298@debbugs.gnu.org To: covici@ccs.covici.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 17 14:13:09 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIEnU-0005G5-02 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Dec 2016 14:13:08 +0100 Original-Received: from localhost ([::1]:36715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIEnY-0002rg-8I for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Dec 2016 08:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIEnR-0002kE-J8 for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2016 08:13:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIEnO-0007Wo-DM for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2016 08:13:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cIEnO-0007Wk-9E for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2016 08:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cIEnO-0004Yf-3t for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2016 08:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2016 13:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24298 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24298-submit@debbugs.gnu.org id=B24298.148198036717498 (code B ref 24298); Sat, 17 Dec 2016 13:13:02 +0000 Original-Received: (at 24298) by debbugs.gnu.org; 17 Dec 2016 13:12:47 +0000 Original-Received: from localhost ([127.0.0.1]:44818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIEn8-0004YA-Oz for submit@debbugs.gnu.org; Sat, 17 Dec 2016 08:12:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIEn7-0004Xz-V9 for 24298@debbugs.gnu.org; Sat, 17 Dec 2016 08:12:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIEmz-0007RG-Jt for 24298@debbugs.gnu.org; Sat, 17 Dec 2016 08:12:40 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIEmz-0007RC-Gi; Sat, 17 Dec 2016 08:12:37 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3652 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cIEmy-0002PU-OL; Sat, 17 Dec 2016 08:12:37 -0500 In-reply-to: (message from John Covici on Sat, 10 Dec 2016 13:46:15 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:127102 Archived-At: > Date: Sat, 10 Dec 2016 13:46:15 -0500 > From: John Covici > Cc: 24298@debbugs.gnu.org > > > > I am sorry, it wasn't a makefile, you are correct. OK, let me try > > > again. Before the restore commit, when I enter emacs, the current > > > buffer is brltty-9999.ebuild but after the commit the current buffer > > > is the default.xml. Before the restore commit, if I do c-x-b the > > > default buffer it wants to switch to is default.xml. After the > > > restore commit, when the current buffer is default.xml when it should > > > be brltty-9999.ebuild the default buffer to switch to is the scratch > > > buffer. In a desktop with many buffers, after the restore commit, it > > > seems to pick a random buffer to be the current buffer rather than the > > > one it should be. > > > > > > I hope this is clear now. > > > > It is, thanks. But please also answer my question above about the > > order of buffers in the list returned by buffer-list, before you quite > > Emacs which writes the desktop file. > > Here is what I have before the restore commit. > > CRM Buffer Size Mode File > . brltty-9999.ebuild 4916 Text > /usr/local/portage/app-accessibility/brltty/brltty-9999.ebuild > default.xml 48920 nXML Invalid > /etc/freeswitch/conf/dialplan/default.xml > %* *Completions* 275 Completion List > *scratch* 145 Lisp Interaction > %* *Messages* 578 Messages > > And here is what I get after the commit > CRM Buffer Size Mode File > *scratch* 145 Lisp Interaction > %* *Messages* 206 Messages > brltty-9999.ebuild 4916 Text > /usr/local/portage/app-accessibility/brltty/brltty-9999.ebuild > . default.xml 48920 nXML Invalid > /etc/freeswitch/conf/dialplan/default.xml > > and if I quit emacs and use emacs before the commit, I get the first > one. > > Hope this helps. Thanks, can you try the patch below and see if it solves this problem? diff --git a/lisp/desktop.el b/lisp/desktop.el index 1f460b7..e83891b 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1157,13 +1157,13 @@ desktop-lazy-timer ;; ---------------------------------------------------------------------------- (defun desktop-restoring-frameset-p () "True if calling `desktop-restore-frameset' will actually restore it." - (and desktop-restore-frames desktop-saved-frameset t)) + (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t)) (defun desktop-restore-frameset () "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 (and (display-graphic-p) (desktop-restoring-frameset-p)) + (when (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))