Talespin_Kit
Talespin_Kit

Reputation: 21877

eval-after-load does not execute the forms

As per the elisp docs http://www.gnu.org/software/emacs/manual/html_node/elisp/Hooks-for-Loading.html the eval-after-load should evaluate the forms irrespective of the library(in this case its "org") is loaded or not. But the following expression does not seem to have any effect on the form (message "HELLO").

(eval-after-load "org" '(message "HELLO"))

The expected result is to find the string "HELLO" printed on the *Message* buffer which does not seems to happen.

Upvotes: 0

Views: 203

Answers (1)

user2053036
user2053036

Reputation:

It seems you have misunderstood the manual, the form is not executed irrespective of whether the library is loaded or not. The form will be evaluated whenever the library is loaded. If the library is already loaded it will evaluate the form immediately. In case of Magnar's config, the org-setup.el is not 'require'd immediately rather it is 'require'd whenever org is loaded.

Upvotes: 2

Related Questions