help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: desktop.el and frame parameters when -nw


From: Eli Zaretskii
Subject: Re: desktop.el and frame parameters when -nw
Date: Fri, 27 Jul 2018 12:11:33 +0300

> From: Jay Kamat <jaygkamat@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 25 Jul 2018 20:02:57 -0700
> 
> > Try removing the (display-graphic-p). But I'm quite confident that this will
> > get you into lots of other troubles.
> 
> Thanks for the pointer! I was able to come up with this:
> 
> (unless (display-graphic-p)
>   (setq desktop-restore-forces-onscreen nil)
>   (defun desktop-restoring-frameset-p ()
>     "True if calling `desktop-restore-frameset' will actually restore it.
> 
> Removes graphical from the list of required parameters."
>     (and desktop-restore-frames desktop-saved-frameset t)))
> 
> I'm not sure why I needed to set `desktop-restore-forces-onscreen' to nil, but
> I was getting errors without it. With this though, I'm getting the expected
> behavior. I'll remember to disable this if I run into any odd issues or
> breakages though. Hopefully the gui frame parameters that I shouldn't be
> restoring isn't a problem since the desktop sessions I'm loading from are
> terminal-only (for now at least).

The reason for the condition you removed is that restoring the
frameset on TTYs which were saved in a GUI session triggers bugs.  If
you don't care about those bugs, fine.



reply via email to

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