So after-init-hook does not appear, but after-init-time seems to be set, which seems to come from an after-init-hook. (*scratch* *Minibuf-0* *Messages* *code-conversion-work* *Echo Area 0* *Echo Area 1*)Īfter-init-time 0.03s (printed via emacs-startup-hook)Įmacs-startup-hook after window-setup-hook (add-hook 'buffer-list-update-hook 'buffer-hook-function) (add-hook 'emacs-startup-hook (lambda () (append-to-file (format "after-init-time %.2fs (printed via emacs-startup-hook)\n" (float-time (time-subtract (current-time) after-init-time))) nil "log.txt"))) (add-hook 'emacs-startup-hook (lambda () (append-to-file "emacs-startup-hook after window-setup-hook\n" nil "log.txt"))) (add-hook 'window-setup-hook (lambda () (append-to-file "window-setup-hook\n" nil "log.txt"))) (add-hook 'before-init-hook (lambda () (append-to-file "before-init-hook\n" nil "log.txt"))) (add-hook 'after-init-hook (lambda () (append-to-file "after-init-hook\n" nil "log.txt"))) (add-hook 'emacs-startup-hook (lambda () (append-to-file "emacs-startup-hook\n" nil "log.txt"))) (append-to-file (format "%s" (buffer-list)) nil "log.txt") I run plain emacs ( emacs -l test.el -Q) with a test script (modified from this question) However, with emacs-startup-hook it worked as expected: (use-package heaven-and-hell Short story: The theme just did not show up automatically at emacs start, when it is invoked by an after-init-hook.
0 Comments
Leave a Reply. |