Keep Desktop.el from Changing Frame Colors

Viewed 15

My intention is to persist/restore the state of Emacs through restarts. I'm working under OSX, where the standard behavior of applications is to restore session and state after a restart. Emacs is the only application I know that does not do this by default. Ideally, I'd like Emacs to simply match the standard behavior.

I have the following line in my init file: (desktop-save-mode 1) The problem I'm having is that some of the colors are changed after restarting, notably the titlebar, whose foreground and background both appear to be set black, which makes it both ugly and impossible to read.

I cannot understand why desktop.el would change the colors of the window indiscriminately. Does anyone know how to prevent this?

Alternatively, is there an another package that I can use for restoring session/state? I don't need or want anything complicated; I just want the basic restore behavior similar to what seems to be standard for all modern applications, none of which require my intervention.

1 Answers

This answer provides some info, but doesn't directly answer how to fix the problem you report. (I'm not sure just what that problem is, as you don't provide a specific recipe.) I don't find any hook that's specific to desktop restoring, but maybe there is something similar. Hopefully someone else will provide an answer that helps with that.


As for understanding why desktop.el changes frame colors: It tries to restore frames to their original state, so it records and later restores their frame parameters, including the frame background parameter.

But if you find that it's not restoring the state that was supposedly recorded last, and it's instead changing things (e.g. colors), then please consider reporting that as a bug: M-x-report-bug.

Related