emacs-devel
[Top][All Lists]
Advanced

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

Re: About desktop file


From: Eli Zaretskii
Subject: Re: About desktop file
Date: Mon, 12 Sep 2016 19:43:14 +0300

> Cc: address@hidden
> From: Angelo Graziosi <address@hidden>
> Date: Sun, 11 Sep 2016 22:13:25 +0200
> 
> > 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.
> 
> No no no. I didn't change anything. This is a recipe:
> 
> Save you current ~/.emacs.d folder then create an empty one:
> 
> mkdir .emacs.d
> 
> and put there this init.el file
> 
> $ cat init.el
> 
> (set-face-attribute 'default nil :font "Source Code Pro 13" )
> (set-frame-font "Source Code Pro 13" nil t)
> 
> ;; Instead of saving on ~/.emacs.desktop
> (setq desktop-base-file-name "~/.emacs.d/desktop")
> 
> ;; Instead of saving on ~/.emacs.desktop.lock
> (setq desktop-base-lock-name "~/.emacs.d/desktop.lock")
> 
> ;; Save desktop
> (desktop-save-mode 1)
> 
> 
> Now start Emacs and visit, for example, init.el. Quit Emacs saving the 
> desktop.
> 
> Restart Emacs. It reload init.el and the font used is right, Source Code 
> Pro. This is confirmed in Options | Set default font.
> 
> Now, in the init.el file, change "Source Code Pro 13" with, for example, 
> "Lucida Console 13". Quit Emacs. Restart Emacs. It reload init.el but 
> displays it with "Source Code Pro" NOT with the font we have set in the 
> init.el file, and Options | Set default font still shows it is using 
> Source Code Pro. I would expect the buffer is rendered with the font we 
> have set in the init.el file.

That's exactly what I meant, sorry for not making it more clear.

> My opinion is that desktop file should not register this information, 
> the font used should be always what is set in the initialization file.. 
> otherwise why it is called "initialization" file?

Does Martin's advice give you what you want?  I think different users
will have different expectations regarding what frame parameters of
existing frames should be restored, so customization is the right way
of fitting this to your needs.



reply via email to

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