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: Wed, 16 Jan 2013 18:04:50 +0100 Message-ID: <871udlrrd9.fsf@Rainer.invalid> References: <80licv564w.fsf@somewhere.org> <87obhrrl44.fsf@bzg.ath.cx> <878v8ujcyn.fsf@Rainer.invalid> <87mwwnc0zg.fsf@bzg.ath.cx> <87ehhzsusx.fsf@Rainer.invalid> <87623bbybd.fsf@bzg.ath.cx> <871udzsr02.fsf@Rainer.invalid> <87wqvrsqcp.fsf@bzg.ath.cx> <87vcaxyk03.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvWQM-0006QE-D2 for emacs-orgmode@gnu.org; Wed, 16 Jan 2013 12:05:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvWQK-0001PC-KI for emacs-orgmode@gnu.org; Wed, 16 Jan 2013 12:05:14 -0500 Received: from plane.gmane.org ([80.91.229.3]:41404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvWQK-0001Ou-EI for emacs-orgmode@gnu.org; Wed, 16 Jan 2013 12:05:12 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TvWQU-0007Q5-S3 for emacs-orgmode@gnu.org; Wed, 16 Jan 2013 18:05:22 +0100 Received: from pd9eb43fc.dip.t-dialin.net ([217.235.67.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Jan 2013 18:05:22 +0100 Received: from Stromeko by pd9eb43fc.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Jan 2013 18:05:22 +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 Bernt Hansen writes: > For the record here is the output on my Emacs: > > GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of 2013-01-08 > on murphy, modified by Debian > > Current git head: release_7.9.3d-826-gbe0d87d I can't check Emacs 23.2 right now, but Emacs 23.4 comes with Org version 6.33x installed. Just looking at what loaddefs.el has defined as autoloads from org.el: ;;;### (autoloads (org-customize org-reload org-require-autoloaded-modules ;;;;;; org-submit-bug-report org-cycle-agenda-files org-iswitchb ;;;;;; org-map-entries org-open-link-from-string org-open-at-point-global ;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode ;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle ;;;;;; org-mode) "org" "org/org.el" (20712 11830)) ;;; Generated autoloads from org/org.el Now compare that with the same section generated for a recent Git version: ;;;### (autoloads (org-customize org-reload org-submit-bug-report ;;;;;; org-cycle-agenda-files org-switchb org-open-link-from-string ;;;;;; org-open-at-point-global org-insert-link-global org-store-link ;;;;;; org-run-like-in-org-mode turn-on-orgstruct++ turn-on-orgstruct ;;;;;; orgstruct-mode org-global-cycle org-cycle org-mode org-clock-persistence-insinuate ;;;;;; turn-on-orgtbl org-version org-babel-do-load-languages) "org" ;;;;;; "org.el" (20726 54443)) ;;; Generated autoloads from org.el So yes, "org-mode" is autoloaded, but some other stuff that should be isn't. Things get more interesting with the autoloads that are defined in the earlier version, but not anymore in the newer. In the case of org-iswitchb the autoload still works since it is defaliased to org-switchb in the same file. If it were removed, you'd get an error when trying to use it, the same if it was moved to another file (since the autoload definition says to look in "org" it will not look in "org-whatever-i-have-been-moved-to". Also if the file in question has been renamed ("org-exp-blocks" exists in 6.33x, but not in a current version), then those autoloads will also not work. Having Emacs pull in the current autoload definitions will ensure that all current autoloads are pointing to the correct file, so if you are using only those everything is fine. It still leaves some definitions for functions that may not exist anymore, but you would not be able to use them anyway, so while not squeaky-clean, it will work in practise. There is one problem that all this still doesn't solve: if a previously autoloaded function has no current autoload definition and the file it used to reside in has been renamed, then Emacs will happily descend into the load-path to load the function along with that old file. This is why Emacs itself should provide a way to de-activate a built-in package when a newer version has been installed so that these stale autoload definitions aren't present after initialization (it is probably possible to traverse load-history to remove superseded autoload definitions, but there is no ready-made function to do this AFAIK). Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables