Quitting my Emacs takes a really long time.

Is there a good way to track what's happening while quitting Emacs?

(So far I'm turning to git blame to figure out what changes I have made to cause this problem.)

  • 1
    Yes, type: M-x describe-variable RET kill-emacs-hook RET – lawlist Jul 24 '16 at 4:20
  • 1
    Since several buffers are often killed when quitting Emacs, also type: M-x describe-variable RET kill-buffer-hook RET. – lawlist Jul 24 '16 at 6:05
  • Check whether you are automatically saving something when you quit. Prime candidates are saving a desktop and saving bookmarks. – Drew Jul 24 '16 at 15:50
  • 1
    If you don't see the problem when you use emacs -Q (no init file) then recursively bisect your init file until you isolate the problematic part. This is quick and foolproof. – Drew Jul 24 '16 at 15:51
  • Thank you @lawlist and @Drew for your helpful comments. In fact, my problem was solved by inspecting kill-emacs-hook (It turned out that migemo-pattern-alist-save was causing the slow quit). @lawlist , it would be great if you could move your comment into an answer, so I can accept it as the solution. Thank you for both of you. – diadochos Jul 26 '16 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.