I am trying to have configuration byte-compiled to improve performances further.
The original code works with no issue. However, adding the optional compile
argument:
(require 'ob-tangle)
(org-babel-load-file (expand-file-name "dotemacs.org" user-emacs-directory) t)
Yields the following:
dotemacs.el:79:17:Warning: reference to free variable `package-archives'
dotemacs.el:79:17:Warning: assignment to free variable `package-archives'
dotemacs.el:91:4:Error: Cannot open load file: no such file or directory, use-package
Here is my init.el. And here is the part that breaks in my dotemacs.org
.
use-package
beforeorg-babel-load-file
did fix my issue. I haven't noticed any improvement in performance. Also, it compiles everytime, even when files didn't change. – Mathieu Marques Jun 10 '16 at 15:22.org
files, you won't notice any performance gain after byte-compiling your init file because it's insignificant compared to (1) tangling the org-file and (2) loading all the packages. To address the issue (2) use the:defer t
option ofuse-package
where appropriate. To address (1) change your code to check timestamps on the.org
and the.el
files and tangle (runorg-babel-load-file
) only when.org
is newer. – Ury Marshak Jun 11 '16 at 11:26