unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: desktop.el and frame parameters when -nw
@ 2018-07-25  6:33 martin rudalics
  2018-07-25 14:29 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2018-07-25  6:33 UTC (permalink / raw)
  To: jaygkamat; +Cc: help-gnu-emacs

 > When desktop.el saves/loads a session, it normally saves and loads the 'frame
 > parameters' (set with `set-frame-parameter' and `frame-parameter'). However,
 > when starting emacs with -nw (in a terminal, with no gui), these frame
 > parameters don't seem to be restored.

I suppose this is due to desktop.el's

(defun desktop-restoring-frameset-p ()
   "True if calling `desktop-restore-frameset' will actually restore it."
   (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t))

Try removing the (display-graphic-p).  But I'm quite confident that
this will get you into lots of other troubles.

martin



^ permalink raw reply	[flat|nested] 6+ messages in thread
* desktop.el and frame parameters when -nw
@ 2018-07-25  2:03 Jay Kamat
  2018-07-25 14:30 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Jay Kamat @ 2018-07-25  2:03 UTC (permalink / raw)
  To: Help GNU Emacs

Hi!

I'm running into an odd issue, and I'd like to see if anyone else has seen it
before (or knows any way to solve it).

When desktop.el saves/loads a session, it normally saves and loads the 'frame
parameters' (set with `set-frame-parameter' and `frame-parameter'). However,
when starting emacs with -nw (in a terminal, with no gui), these frame
parameters don't seem to be restored.

Steps I took to reproduce:

1. Start emacs -q
2. Eval (set-frame-parameter nil 'test 44)
3. M-x desktop-save to an unused directory.
4. emacs -q -nw
5. M-x desktop-change-dir to the directory from before
6. (frame-parameter nil 'test) returns nil.

However, running steps 4->6 without -nw returns the frame parameter as
expected.

Does this have anything to do with the special ways that frames are handled in
a terminal? If so, what can I do to work around that?

-Jay



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-27  9:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25  6:33 desktop.el and frame parameters when -nw martin rudalics
2018-07-25 14:29 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2018-07-25  2:03 Jay Kamat
2018-07-25 14:30 ` Eli Zaretskii
2018-07-26  3:02   ` Jay Kamat
2018-07-27  9:11     ` Eli Zaretskii

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).