eschulte/emacs24-starter-kit — Issue #12: Wrong order of loading literate files?
Author: ddoherty03
Created: 2011-12-08 01:04:47+00:00
State: open

Eric,

I am reluctant to suggest that there is an error in your code, since I've been a shameless parasite on your programming for some time now. Also, I'm not really an elisp programmer. So take this cum grano sal.

1. It looks like the starter kit is looking for and loading .el files before looking for a .org file. I'm looking at starter-kit.org,
the code under "System/User specific customizations". At the end, it appears to look for and load in the wrong order.
I've changed the order below, and many errors I was getting went away.

;; load any files in the user's directory
(when (file-exists-p user-specific-dir)
(let ((default-directory user-specific-dir))
;; N.B.: I changed the order of the following two clauses
(mapc #'org-babel-load-file
(directory-files user-specific-dir nil ".*org$"))
(mapc #'load
(directory-files user-specific-dir nil ".*el$"))))))
2. Along the same lines, the function org-babel-load-file in ob-tangle.el looks like its comparing the age of
the input "file" and the output "exported-file" in the wrong direction.
Here is the snippet as I've changed it.
(unless (and (file-exists-p exported-file)
;; N.B: the following has the order reversed from the official version
(> (age exported-file) (age file)))
(org-babel-tangle-file file exported-file "emacs-lisp"))

I'm not at all confident about these, but I can't seem to get my literate elisp files to work otherwise. After an edit, the older .el
file still gets loaded without a re-tangle.

Regards,

Dan Doherty