Due to an misformed Makefile I deleted my ~/.config dir which contained all my Emacs setting under .config/emacs following XDG-sheme.

Luckily I had a backup of all my dotfiles so no big problem -- I thought.

But now I tried to reinitalize Emacs with the dotfiles and so far everything worked fine. Except that when I open Emacs now, I get the error message run-hooks: Cannot open load file: No such file or directory, emacs.

Thus, Emacs seems to be unable to execute my code beginning with (use-package emacs ...). All other packages are installed and working, as I can see (e.g. evil-mode etc.). This error is very annoying, since I load a lot of standard settings and set a bunch of keybindings inside the (use-package emacs) function.

Why can't Emacs load itself? I couldn't find a solution so far. May be due to the deletion of the config dir, but that should be solved by restoring it.

My Emacs version is 30.0.5 compiled from source.

I'm running Void Linux, but that should be no big deal since the problem seems Emacs-related.

  • What does (featurep 'emacs) say? What does (require 'emacs) say? What does (use-package emacs) say? If the answers are t, emacs and nil resp. then we need to see the body of your (use-package emacs ...) form I think.
    – NickD
    Commented Jun 8 at 15:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.