unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: covici@ccs.covici.com
Cc: 24298@debbugs.gnu.org
Subject: bug#24298: Acknowledgement (25.1; problem with restoring desktop)
Date: Sat, 17 Dec 2016 15:11:59 +0200	[thread overview]
Message-ID: <83fulm7l9c.fsf@gnu.org> (raw)
In-Reply-To: <m3fulv8vwo.wl-covici@ccs.covici.com> (message from John Covici on Sat, 10 Dec 2016 13:46:15 -0500)

> Date: Sat, 10 Dec 2016 13:46:15 -0500
> From: John Covici <covici@ccs.covici.com>
> 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))





  reply	other threads:[~2016-12-17 13:11 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 11:31 bug#24298: 25.1; problem with restoring desktop John Covici
2016-08-24 14:23 ` Eli Zaretskii
2016-08-24 14:53   ` John Covici
2016-08-24 15:11     ` Eli Zaretskii
2016-08-25  1:32       ` John Covici
2016-08-24 15:46 ` martin rudalics
2016-08-24 16:02   ` Eli Zaretskii
2016-08-24 20:57     ` N. Jackson
2016-08-25  9:16       ` martin rudalics
2016-08-25 13:09         ` N. Jackson
2016-08-25 14:52           ` Eli Zaretskii
2016-08-25  9:16     ` martin rudalics
2016-08-25 14:48       ` Eli Zaretskii
2016-08-25 15:31         ` John Covici
2016-08-25 16:22           ` Eli Zaretskii
2016-08-25 18:22             ` John Covici
2016-08-25 18:30               ` Eli Zaretskii
2016-08-25 19:04                 ` John Covici
2016-08-25 19:18                   ` Eli Zaretskii
2016-08-25 19:30                     ` John Covici
2016-08-25  1:33   ` John Covici
2016-08-25  9:17     ` martin rudalics
2016-08-25 10:56       ` John Covici
2016-08-25 12:27         ` martin rudalics
2016-08-25 14:50           ` Eli Zaretskii
     [not found] ` <handler.24298.B.14720383029936.ack@debbugs.gnu.org>
2016-12-04  1:51   ` bug#24298: Acknowledgement (25.1; problem with restoring desktop) John Covici
2016-12-04 15:28     ` Eli Zaretskii
2016-12-04 15:34       ` John Covici
2016-12-10 14:19         ` Eli Zaretskii
2016-12-10 15:02           ` John Covici
2016-12-10 15:50             ` Eli Zaretskii
2016-12-10 16:02               ` John Covici
2016-12-10 17:47                 ` Eli Zaretskii
2016-12-10 18:46                   ` John Covici
2016-12-17 13:11                     ` Eli Zaretskii [this message]
2016-12-17 14:05                       ` John Covici
2016-12-17 14:46                         ` Eli Zaretskii
2016-12-17 16:41                           ` John Covici
2016-12-17 17:07                             ` Eli Zaretskii

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=83fulm7l9c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24298@debbugs.gnu.org \
    --cc=covici@ccs.covici.com \
    /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).