From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Opening (for the first time) a 10-line Org doc takes 4 seconds Date: Sat, 05 Jan 2013 13:01:18 +0100 Message-ID: <87ehhzsusx.fsf@Rainer.invalid> References: <80licv564w.fsf@somewhere.org> <87obhrrl44.fsf@bzg.ath.cx> <878v8ujcyn.fsf@Rainer.invalid> <87mwwnc0zg.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrSRY-0006qV-7x for emacs-orgmode@gnu.org; Sat, 05 Jan 2013 07:01:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrSRW-0000Xu-WE for emacs-orgmode@gnu.org; Sat, 05 Jan 2013 07:01:40 -0500 Received: from plane.gmane.org ([80.91.229.3]:34517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrSRW-0000Xp-PI for emacs-orgmode@gnu.org; Sat, 05 Jan 2013 07:01:38 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TrSRe-0000sN-Cq for emacs-orgmode@gnu.org; Sat, 05 Jan 2013 13:01:46 +0100 Received: from pd9eb2e3c.dip.t-dialin.net ([217.235.46.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Jan 2013 13:01:46 +0100 Received: from Stromeko by pd9eb2e3c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 05 Jan 2013 13:01:46 +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 Bastien writes: > I use Org from Git and I don't have > > (load "org-loaddefs.el" t t) > > in my .emacs.el. I simply have: > > (add-to-list 'load-path "~/install/git/org-mode/lisp/") > > before any Org configuration and *all* autoloads are correct. Only with a recent Emacs 24 and it really only works for code paths that load org.el early enough. I cannot stress often enough that the autoload definitions are not absolute and _this_ is the part that makes things really tricky. They will follow changes in load-path, but only if the library name stays the same. Again, the example to try is this: Move an autoloaded function from one file to another in the Git directory. Re-generate the autoload file. Re-start Emacs, try to call that function and see Emacs try to load the _old_ file (because that's the autoload definition it has at that point). Re-start Emacs again, load org-loaddefs with the proper load-path in place and see that it loads the new file. > My understanding is that users who don't use "make install" > will have to do the same and add the correct load-path, which > will in turn produce the correct autoloads. Am I right? I'm not sure I understand you correctly. All of the following conditions must hold for this to work: - the load-path is set up to point to the Git work-tree first and no functions in the org namespace have been called before doing so - the org-loaddefs.el in the Git worktree is up-to-date - none of the invoked functions have their library-name changed in the Git worktree - all code-paths must trigger loading of org (and thus org-loaddefs) before invoking further autoloads Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada