all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history]
Date: Thu, 11 May 2006 21:44:39 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.3.96.1060511213552.275A-100000@acm.acm> (raw)
In-Reply-To: <59119.128.165.123.132.1147369590.squirrel@webmail.lanl.gov>

Evening, Stuart!

On Thu, 11 May 2006, Stuart D. Herring wrote:

>> The use of symbols (as opposed to file names) here has only just been
>> introduced into Emacs (sometime in Emacs 22), so there are many millions
>> of (eval-after-load "foo" ....) forms in existing source throughout the
>> Emacs universe.  We need to stay compatible with that source.

>Yes, I realize that.  I was just being dumb and talking before reading;
>I see now that exactly what I was suggesting is already implemented in
>parallel with the filename system.

>It seems to me that the simple way to handle the real problem (rather
>than the one I fabricated) is to fully-canonicalize (find real file
>name, find absolute file name, chase symlinks) the arguments to both
>`eval-after-load' and `load' and compare them (that is, use them to
>read/write the alist) afterwards.

I proposed a patch (for load) to do this yesterday.

>But could there be a problem where preloaded files didn't match on a
>different machine?  If so, it might make sense to express the file names
>relative to the entry of `load-path' that let them be found.

This is, in fact done.  The preloaded files are expressed relative to
..../emacs/lisp, and fleshed out to absolute names when Emacs is started.
After all, the preloaded files are loaded from the building lisp
directory, which is rarely the same as the one Emacs is installed to.

>Of course, then you couldn't chase symlinks.  Maybe during preloading
>`load-history' should get the short names (e.g., "font-lock", "simple")
>of loaded files, and then at real startup do the canonicalization before
>loading anything that would need to use `eval-after-load'?

Have a look at command-line (in startup.el) and Fload (in lread.c).  They
work almost exactly like you suggest they should.  :-)

>Since it'd only be preloaded files, customizations to `load-path' would
>probably be irrelevant, so it would be okay to resolve them before
>loading .emacs.

Indeed.

>Apologies if this is uneducated rambling; I'm not too familiar with this
>feature.

Not at all, great minds think alike.  :-)  Happy hacking!

>Davis

-- 
Alan.

  reply	other threads:[~2006-05-11 21:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 21:11 Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history] Alan Mackenzie
2006-05-11 16:46 ` Stuart D. Herring
2006-05-11 17:19   ` Alan Mackenzie
2006-05-11 17:46     ` Stuart D. Herring
2006-05-11 21:44       ` Alan Mackenzie [this message]
2006-05-12  4:15       ` Richard Stallman
2006-05-14 11:07 ` FIXED!! " Alan Mackenzie
2006-05-15  5:13   ` Richard Stallman
2006-05-21  9:39     ` Alan Mackenzie
2006-05-22  2:39       ` Richard Stallman
2006-05-23 17:21         ` Alan Mackenzie
2006-05-23 17:51           ` Andreas Schwab
2006-05-23 20:10             ` Alan Mackenzie
2006-05-23 20:58             ` FIXED!! Re: Clarification of eval-after-load Stefan Monnier

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

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

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1060511213552.275A-100000@acm.acm \
    --to=acm@muc.de \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.