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
  • 75,699
  • 9
  • 109
  • 225
Yasushi Shoji
  • 2,151
  • 15
  • 35

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
  • 48,657
  • 3
  • 76
  • 115