emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: Opening (for the first time) a 10-line Org doc takes 4 seconds
Date: Wed, 16 Jan 2013 18:04:50 +0100	[thread overview]
Message-ID: <871udlrrd9.fsf@Rainer.invalid> (raw)
In-Reply-To: 87vcaxyk03.fsf@norang.ca

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	other threads:[~2013-01-16 17:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 22:48 Opening (for the first time) a 10-line Org doc takes 4 seconds Sebastien Vauban
2012-12-18 23:33 ` Bastien
2012-12-19  9:05   ` Sebastien Vauban
2012-12-23  8:52     ` Bastien
2012-12-19 15:09   ` Achim Gratz
2013-01-05 11:39     ` Bastien
2013-01-05 12:01       ` Achim Gratz
2013-01-05 12:37         ` Bastien
2013-01-05 13:23           ` Achim Gratz
2013-01-05 13:37             ` Bastien
2013-01-16  1:49               ` Bernt Hansen
2013-01-16 17:04                 ` Achim Gratz [this message]
2013-01-05 12:39         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871udlrrd9.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).