all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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
* 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

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  2:03 desktop.el and frame parameters when -nw Jay Kamat
2018-07-25 14:30 ` Eli Zaretskii
2018-07-26  3:02   ` Jay Kamat
2018-07-27  9:11     ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2018-07-25  6:33 martin rudalics
2018-07-25 14:29 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.