I just upgraded Emacs to 25.1.1 (via the Arch Linux package manager pacman
).
Now I can't set the font size in my .emacs
anymore.
I am able to adjust it via C-x C-+
and C-x C--
, and I can also use M-x customize
to set the default font height to 83 instead of 103. This works for my current session in all buffers, then.
But when I save the generated config code (attached below) in my .emacs
and restart, the settings are ignored and Emacs starts with the default font size instead. I am confused as to where to start searching for the cause of the problem, since it works if I adjust it in each session, but does not work when restarting Emacs.
There is no error message and nothing of help in the *Messages*
buffer.
Where can I start looking for the problem?
I must add that I have no idea about how Emacs-Lisp works and can only copy-paste things into my config file. It's a very confusing language for me.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 83 :width normal :foundry "PfEd" :family "DejaVu Sans Mono"))))
'(tabbar-button ((t (:inherit tabbar-default :foreground "dark red"))))
'(tabbar-button-highlight ((t (:inherit tabbar-default))))
'(tabbar-default ((t (:inherit variable-pitch :background "#959A79" :foreground "black" :weight bold))))
'(tabbar-highlight ((t (:underline t))))
'(tabbar-selected ((t (:inherit tabbar-default :background "#95CA59"))))
'(tabbar-separator ((t (:inherit tabbar-default :background "#95CA59"))))
'(tabbar-unselected ((t (:inherit tabbar-default)))))
.emacs
:-(set-frame-font "PragmataPro 13")
. Put the font-name followed by the font-size in the quotes. Thats it..emacs
file or you just set it withcustomize-faces
and clicked Apply and Save?customize
and let it add it to my.emacs
automaticallyset-frame-font
worked. I had to find a super long string for my desired font viaxfontsel
in Linux, according to here: emacswiki.org/emacs/SetFontsC-x 5 2
. The new frame will have the old font that I don't want...