I have suffered from the same error for many months.
Eager macro-expansion failure: (wrong-number-of-arguments (3 . 4) 2)
I tried verifying the init.el
by "bisecting" technique. I could not identify the cause by this. I found that the init.el
file itself was not the cause of the error.
I tried 'M-x packge-refresh-contents' but it did not fixed the problem.
Finally, I could fix the error by the following steps.
- take a backup of the
~/.emacs.d/
directory including theinit.el
file. - remove the
~/.emacs.d/
directory completely - recreate the
~/.emacs.d/
directory bymkdir
command - copy the
init.el
file from the backup into the newly created~/.emacs.d/
directory. - start emacs; effectively applying the restored
~/.emacs.d/init.el
file. - Emacs emitted some errors, that said some directories are missing under the
~/.emacs.d
, for example~/.emacs.d/conf
. So I created them as told to. - Emacs emitted some errors, that said 4 or 5 packages are refered to in the
init.el
but not actually installed. So I freshly installed those packages byM-x package-list-packages
. At this timing, I noticed that~/.emacs.d/elpa
directory was newly created and contents were downloaded. - Finally, my emacs launched without "Eager macro expansion error".
I think that I could fix the problem because I once removed the elpa
directory completely, and I recreated it with fresh package contents.
My computer: Mac Book Air, 2019 My OS: macOS Sonoma, version 14.7 My Emacs version: 29.4