emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: bug#15888: 24.3.50; Eval-after-load eval'ed twice
Date: Tue, 19 Nov 2013 21:07:58 +0100	[thread overview]
Message-ID: <86li0kkvdt.fsf@somewhere.org> (raw)
In-Reply-To: CANdFEAEdD1rKvXOwi+ktROSqYXTGg3tbEgTd-hHe10Zfa7YbsQ__2521.04604519463$1384604463$gmane$org@mail.gmail.com

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

  reply	other threads:[~2013-11-19 20:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <868uws6lgt.fsf@somewhere.org>
     [not found] ` <mailman.6013.1384380609.10748.bug-gnu-emacs@gnu.org>
     [not found]   ` <864n7f7u8d.fsf@somewhere.org>
     [not found]     ` <mailman.6027.1384398545.10748.bug-gnu-emacs@gnu.org>
     [not found]       ` <8638myzu9t.fsf@somewhere.org>
2013-11-14 22:01         ` bug#15888: 24.3.50; Eval-after-load eval'ed twice Glenn Morris
2013-11-15  6:04           ` Bastien
     [not found]             ` <87y54qdwvh.fsf-E3UqQZAQFPqWIDz0JBNUog@public.gmane.org>
2013-11-15  8:33               ` Sebastien Vauban
     [not found]         ` <83siuyiyq4.fsf@gnu.org>
     [not found]           ` <83siuyiyq4.fsf-mXXj517/zsQ@public.gmane.org>
2013-11-15  8:16             ` Sebastien Vauban
     [not found]           ` <868uwqxeoj.fsf@somewhere.org>
2013-11-15  8:42             ` Eli Zaretskii
     [not found]             ` <83iovuhx8w.fsf@gnu.org>
     [not found]               ` <83iovuhx8w.fsf-mXXj517/zsQ@public.gmane.org>
2013-11-15  9:06                 ` Sebastien Vauban
     [not found]               ` <86siuyvxtn.fsf@somewhere.org>
2013-11-15 10:34                 ` Eli Zaretskii
     [not found]                 ` <mailman.6245.1384511726.10748.bug-gnu-emacs@gnu.org>
     [not found]                   ` <mailman.6245.1384511726.10748.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2013-11-15 13:01                     ` Sebastien Vauban
2013-11-15 14:15                       ` Stefan Monnier
     [not found]                       ` <jwvbo1l4utn.fsf-monnier+emacsbugs@gnu.org>
     [not found]                         ` <jwvbo1l4utn.fsf-monnier+emacsbugs-mXXj517/zsQ@public.gmane.org>
2013-11-15 14:27                           ` Sebastien Vauban
2013-11-15 14:35                       ` Eli Zaretskii
2013-11-15  0:06 ` Josh
2013-11-19 20:07   ` Sebastien Vauban [this message]
     [not found] ` <CANdFEAEdD1rKvXOwi+ktROSqYXTGg3tbEgTd-hHe10Zfa7YbsQ@mail.gmail.com>
2013-11-15  2:30   ` Glenn Morris
     [not found]   ` <oofvqygzwk.fsf@fencepost.gnu.org>
     [not found]     ` <oofvqygzwk.fsf-iW7gFb+/I3LZHJUXO5efmti2O/JbrIOy@public.gmane.org>
2013-11-15  6:04       ` Sebastien Vauban
     [not found]     ` <86ob5mxktp.fsf@somewhere.org>
2013-11-15 17:02       ` Glenn Morris
2013-11-15 17:57         ` Nick Dokos
2013-11-15 18:31           ` Nicolas Goaziou
2013-11-17  1:23             ` Nick Dokos
2013-11-17  3:06             ` Nick Dokos
2013-11-17  8:59               ` Nicolas Goaziou
2013-11-17 13:41                 ` Nick Dokos
2013-11-17 18:05                   ` Nick Dokos
     [not found]       ` <4jppq1ha35.fsf@fencepost.gnu.org>
2013-11-17 19:45         ` Glenn Morris
     [not found]         ` <mailman.6434.1384717570.10748.bug-gnu-emacs@gnu.org>
     [not found]           ` <868uws6lgt.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
2013-11-19 20:05             ` Sebastien Vauban
2013-11-20  4:06               ` Nick Dokos
2013-11-23 14:05                 ` Nicolas Goaziou
2013-12-04 20:48                   ` Sebastien Vauban
2013-12-04 21:35                     ` Nicolas Goaziou
2020-05-22 12:51                       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86li0kkvdt.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).