Closed pedz closed 1 year ago
I am guessing that an outdated early-init.elc
exists. Or maybe you are installing in a temporary location so user-emacs-directory
isn't correct.
This is how I do it:
(setq load-prefer-newer t)
(let ((dir (file-name-directory (or load-file-name buffer-file-name))))
(add-to-list 'load-path (expand-file-name "lib/compat" dir))
(add-to-list 'load-path (expand-file-name "lib/packed" dir))
(add-to-list 'load-path (expand-file-name "lib/auto-compile" dir)))
(require 'auto-compile)
(auto-compile-on-load-mode)
(auto-compile-on-save-mode)
Yes, I need to update the documentation.
I wondered if my original post was confusing. What I pasted is working. The point was simply that the path to compat needs to be included and the doc say just the paths for packed and auto-compile.
I'll have to decide whether to update the documentation or drop the dependency again. This might involve merging parts of packed
into auto-compile
, so it could take a while.
I've decided to drop the dependency (packed
is gone too).
For me to require auto-compile in my early-init.el file, I had to provide the path to compat. I did this:
so that more paths could be added if needed. I just tested it again and got the same results: Emacs can't find compat: