Subject: Re: bug#15888: 24.3.50; Eval-after-load eval'ed twice

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Nov 2013 21:12:51 +0200

> From: "Sebastien Vauban" <[email-masked]>
> Date: Thu, 14 Nov 2013 19:57:02 +0100
> Cc: [email-masked]
> 
> 0. Copy the minimal configuration in the clipboard
> 1. Go into C:/Program Files/emacs-trunk/bin/
> 2. Launch emacs -Q
> 3. Paste the minimal configuration in the scratch buffer
> 4. Eval it
> 5. Open one random Org file (~/Public/Repositories/worg/ChangeLog.org)
> 6. Look at the echo area
> 7. Check in the Messages buffer -> block has been executed twice!
> 
> See http://screencast.com/t/pfWMZStlb23Z.
> 
> I do not see where extra `load' instructions could stay hidden (and out of my
> mind) by applying this recipe.
> 
> Where is the black magic?

Instead of wondering, run all this under GDB, after putting a
breakpoint at Fload, and see whodunit.

Since 'load' is potentially called many times during startup, I
suggest the following setup:

 (gdb) break Fload
 (gdb) commands
   > p file
   > xstring
   > end
 (gdb) r -Q

Now, when the breakpoint breaks, you will see which file is being
loaded, and need just type "c RET" (or just "RET" after the first
time), and wait for "org-mode" to show in the output of the above
commands; then type "bt" to see who loaded it.