[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About desktop file
Re: About desktop file
Sun, 11 Sep 2016 19:34:26 +0300
> From: Angelo Graziosi <address@hidden>
> Date: Sun, 11 Sep 2016 10:31:41 +0200
> The 'desktop' file is very useful but sometimes it remembers too many
> Suppose I am using "foo" font in my init.el file:
> (set-face-attribute 'default nil :font "foo 13" )
> (set-frame-font "foo 13" nil t)
> and that I am working with many buffers. Now suppose I change the font
> to use 'bar' font:
> (set-face-attribute 'default nil :font "bar13" )
> (set-frame-font "bar 13" nil t)
> When I restart Emacs, it loads the buffers with the old 'foo' font.
I don't think I can reproduce this. But since you didn't show the
full recipe, I cannot be sure I did what you did.
Are you saying that the old font was recorded in the desktop file, but
the new one isn't? How is that possible? Why would the old font end
up being recorded in the desktop file, but not the new one?
Maybe you changed the font outside the Emacs session, just by editing
the init.el file? In that case, you should change the font inside the
session, and then save the desktop, then the information in the
desktop file will be updated for the next restart.
> Is there a way to do this differently?
Yes. First, you could change the font inside the session and save
Another possibility is to disable restoring frames (a font is an
attribute of a frame, not of a buffer).
There's also a possibility to control which variables get saved and
restored, but I'm not sure it will help in this case.
> My opinion is that desktop file should remember cursor position, working
> buffers, their visiting modes, searched word, frame geometry-position
> etc. not the font how buffers are displayed and similar.
If you choose to restore frames, Emacs assumes you want them exactly
as they were the last time. Otherwise, why use desktop at all to save
Of course, if someone wants to extend desktop.el to provide even more
control on what aspects of frames are restored, such patches will be
welcome, I'm sure.
- About desktop file, Angelo Graziosi, 2016/09/11
- Re: About desktop file,
Eli Zaretskii <=
- Re: About desktop file, Eli Zaretskii, 2016/09/12
- Re: About desktop file, Angelo Graziosi, 2016/09/12
- Re: About desktop file, Eli Zaretskii, 2016/09/13
- Re: About desktop file, Angelo Graziosi, 2016/09/13
- Re: About desktop file, Eli Zaretskii, 2016/09/14
- Re: About desktop file, Angelo Graziosi, 2016/09/15