emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Opening (for the first time) a 10-line Org doc takes 4 seconds


From: Achim Gratz
Subject: Re: [O] Opening (for the first time) a 10-line Org doc takes 4 seconds
Date: Wed, 16 Jan 2013 18:04:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]