6

How can I tell package.el to not byte-compile?

It is generally OK to byte-compile installed packages but it makes difficult to test a new Emacs with byte compiler improvements (such as Emacs 26 from 25) if you share .emacs/elpa/ with old Emacsen.

Drew
  • 77,472
  • 10
  • 114
  • 243
Yasushi Shoji
  • 2,186
  • 16
  • 36

1 Answers1

7

Try using a ~/.emacs.d/elpa/.dir-locals.el file containing:

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

no-byte-compile is generally intended to be used as a file-local variable (see C-hig (elisp) Byte Compilation RET), but a quick experiment suggests that it works just fine as a dir-local, and successfully inhibits byte compilation when installing ELPA packages.

phils
  • 50,977
  • 3
  • 79
  • 122