I'd like org-mode to use a particular theme. To this end, I've put the following in my init.el
:
;; Setup org-mode theme
(defun org_setup()
"Setup org-mode"
(load-theme 'doom-laserwave)
)
;; Startup hook for org-mode
(add-hook 'org-mode-hook
(org_setup))
Curiously, whatever file I open (e.g., even init.el
) this theme is used. Why is that? My (limited) understanding is that this code should only be run if org-mode
is initiated. Am I doing something daft?
emacs -q -l minimal.el
and a minimal init file that just contains the above code? If not, bisect your init file to figure out who the culprit is.Unable to find theme file for ‘doom-laserwave’
.(func)
calls the function, so what you are doing is calling the function and adding its return value to the hook. What you want to do instead is add the function itself to the hook, so it can be called later.