When I exit emacs via C-x C-c
(save-buffers-kill-terminal
) it prints a message in minibuffer. I can't read the message because the frame gets destroyed too fast.
I'd like to read the message(s), how can I do this?
When killing Emacs, there are several hooks that may end up being called -- including, but not limited to, kill-emacs-hook
, kill-buffer-hook
(when a buffer is killed), write-file-functions
hook (if a buffer is saved). A user can inspect a hook by calling M-x describe-variable
and the name of the hook. A user can run a hook by evaluating (run-hooks NAME-OF-HOOK)
, which function accepts multiple arguments such that several hooks can be called. The original poster has indicated in a comment above that (run-hooks 'kill-emacs-hook)
triggered the functions that were of particular interest.
kill-emacs-hook
and thekill-buffer-hook
, and the hooks can also be run without killing Emacs by evaluating(run-hooks 'kill-emacs-hook 'kill-buffer-hook)
, or, you can run just one hook at time ... Thewrite-file-functions
hook may also have something interesting attached to it that gets triggered when saving buffers while exiting Emacs.(run-hooks 'kill-emacs-hook)
and then had a look at the Messages buffer. You might write a answer if you like.