From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug#15888: 24.3.50; Eval-after-load eval'ed twice Date: Sat, 16 Nov 2013 20:23:43 -0500 Message-ID: <8761rrizxc.fsf@gmail.com> References: <868uws6lgt.fsf@somewhere.org> <86ob5mxktp.fsf@somewhere.org> <4jppq1ha35.fsf__32040.8881329515$1384535048$gmane$org@fencepost.gnu.org> <87txfdy2cu.fsf@alphaville.bos.redhat.com> <87mwl5jz3q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vhr5n-0000Cn-Dj for emacs-orgmode@gnu.org; Sat, 16 Nov 2013 20:24:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vhr5h-0003q5-J9 for emacs-orgmode@gnu.org; Sat, 16 Nov 2013 20:24:03 -0500 Received: from plane.gmane.org ([80.91.229.3]:38703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vhr5h-0003py-C2 for emacs-orgmode@gnu.org; Sat, 16 Nov 2013 20:23:57 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vhr5f-0003tD-Ih for emacs-orgmode@gnu.org; Sun, 17 Nov 2013 02:23:55 +0100 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Nov 2013 02:23:55 +0100 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Nov 2013 02:23:55 +0100 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Nick Dokos writes: > >> Glenn Morris writes: >> >>> "Sebastien Vauban" wrote: >>> >>>> But I wonder: how can you now reproduce it (and not before)? >>> >>> Because I downloaded a snapshot of Org. >>> Your problem is not with code that is in Emacs current trunk. >> >> Using Glenn's reproducer, I bisected it - another one for Nicolas's >> TODO list, proving once again that no good deed goes unpunished :-) >> >> 0cecf32a0ae559266555b96668dc305710366c96 is the first bad commit >> commit 0cecf32a0ae559266555b96668dc305710366c96 >> Author: Nicolas Goaziou >> Date: Sun Oct 27 11:09:17 2013 +0100 > > Well. The only thing related to load/autoload I can think of is calling > `org-element-cache-reset' in `org-mode' and `org-set-modules'. > > Could you try to replace these calls with > > (when (fboundp 'org-element-cache-reset) (org-element-cache-reset)) > > and test again? > > Assuming I've done everything correctly, this does not fix it. Here's the diff of what I did - let me know if I goofed: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org.el b/lisp/org.el index a3c1958..53eea84 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -373,7 +373,8 @@ When MESSAGE is non-nil, display a message with the version." (set var value) (when (featurep 'org) (org-load-modules-maybe 'force) - (org-element-cache-reset 'all))) + (when (fboundp 'org-element-cache-reset) (org-element-cache-reset 'all)))) +; (org-element-cache-reset 'all))) (defcustom org-modules '(org-w3m org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe org-rmail) "Modules that should always be loaded together with org.el. @@ -5361,7 +5362,8 @@ The following commands are available: ;; Comments. (org-setup-comments-handling) ;; Initialize cache. - (org-element-cache-reset) + ;; (org-element-cache-reset) + (when (fboundp 'org-element-cache-reset) (org-element-cache-reset)) ;; Beginning/end of defun (org-set-local 'beginning-of-defun-function 'org-backward-element) (org-set-local 'end-of-defun-function 'org-forward-element) --8<---------------cut here---------------end--------------->8--- > Regards, -- Nick