Josh wrote: > On Wed, Nov 13, 2013 at 1:27 PM, Sebastien Vauban wrote: >> >> (with-eval-after-load "org" >> (message "Eval this when Org is loaded") >> (sit-for 3) >> (message "")) >> >> the code block in the `with-eval-after-load' is eval'ed twice whenever an Org >> file is loaded. > > Have you checked to see what happens if you specify 'org (a symbol > designating a feature) rather than "org" (a string representing a > file name) above?
Yes, same problem with 'org, as shown with the following ECM. --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/Public/Repositories/org-mode/testing") (add-to-list 'load-path "~/Public/Repositories/org-mode/contrib/lisp") (add-to-list 'load-path "~/Public/Repositories/org-mode/lisp") ;; getting started (require 'org-loaddefs) (add-to-list 'auto-mode-alist '("\\.txt\\'" . org-mode)) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (with-eval-after-load 'ob-lob ;; load some code blocks into the library of Babel (let ((lob-file (concat (file-name-directory (locate-library "org")) "../doc/library-of-babel.org"))) (when (file-exists-p lob-file) (org-babel-lob-ingest lob-file)))) (with-eval-after-load 'org (message "Eval this when Org is loaded") (sit-for 3) (message "")) (message "End of minimal .emacs") --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban