I would like Emacs to not use byte-compiled files because the stack-trace is really messy.

So for my own elisp files, I can add ;; -*-no-byte-compile: t; -*- to disallow byte-compilation.

But how can I enforce this for the packages like evil downloaded from elpa, melpa etc?

  1. Can I prevent package installation from byte-compiling so that there are no .elc's created in the first place?
  2. If that is not possible, I could probably delete them, but would that not be recreated or is that automatically happening during the installation only?

The comment says that I can remove the load-path of .elc, but as far as I know, both .el and .elc is on the same path!


1 Answer 1


You can prevent package installation from byte-compiling. Write the following one liner in ~/.emacs.d/elpa/.dir-locals.el. This is described in package.el: How can I avoid byte-compilation

((emacs-lisp-mode . ((no-byte-compile . t))))

Or you can make Emacs to only load .el files, no .elc files. Write the following code in your .init.el. This is described in Does `load` prefer .elc files over .el files?

(setq load-suffixes '(".el"))
  • 1
    Trying to achieve the same objective (don't load any byte-compiled LISP) in a different environment with straight.el as package manager. Both (setq load-suffixes '(".el")) or (setq load-suffixes '(".el" ".elc")) in my init.el result in the following error on startup: Eager macro-expansion failure: (error "Recursive load" "/usr/local/share/emacs/27.2/lisp/jka-compr.el.gz" ... ) [8 times]
    – lbo
    Feb 2, 2023 at 9:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.