From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: bug#15888: 24.3.50; Eval-after-load eval'ed twice Date: Tue, 19 Nov 2013 21:07:58 +0100 Message-ID: <86li0kkvdt.fsf@somewhere.org> References: <868uws6lgt.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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