I'm using face-remap-add-relative
in a tiny minor mode which, when activated, increases the size of the org-level-1
face. This function is perfect for that because when evaluated it returns a cookie that can be kept for later restoring the original size of the modified face. Here's the code:
(defvar bigger-org-headlines-cookie nil)
(make-variable-buffer-local 'bigger-org-headlines-cookie)
(define-minor-mode bigger-org-headlines
"Increases the size of level 1 Org headlines."
:lighter " Big-Org-Headlines"
(if bigger-org-headlines
(setq bigger-org-headlines-cookie
(face-remap-add-relative 'org-level-1
:height
(expt text-scale-mode-step 1)))
(face-remap-remove-relative bigger-org-headlines-cookie))
(force-window-update (current-buffer)))
Now I changed my mind and want to increase the size of every headline in an Org file. In total there are 8 levels that need to be changed.
Is there an easier way besides changing face-remapping-alist
manually (which BTW is not recommended)?
Suggestions are very welcome.