* bug#16107: changing load-path during dumping
@ 2013-12-11 0:57 Glenn Morris
2013-12-11 14:50 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2013-12-11 0:57 UTC (permalink / raw)
To: 16107
Package: emacs
Version: 24.3
Quoth the elisp manual:
Dumping Emacs uses a special value of `load-path'. If the value of
`load-path' at the end of dumping is unchanged (that is, still the
same special value), the dumped Emacs switches to the ordinary
`load-path' value when it starts up, as described above. But if
`load-path' has any other value at the end of dumping, that value is
used for execution of the dumped Emacs also.
I think this behaviour does not make sense, and that it would be better
to remove it. Motivation:
AFAICS, the only way load-path can change during dumping is if you
change it in a site-load/site-init file. The only thing that you might
sensibly want to do is add an element at the front. Firstly, there is a
better way to do this: use configure's --enable-locallisppath argument.
Secondly, it will break your Emacs. Dumping occurs before Emacs is
installed, so dump_path contains elements that refers to the *source*
directory (ie, PATH_DUMPLOADSEARCH). Your addition gets added to these
elements. After `make install', Emacs normally switches to a load-path
based on the *installation* directory (ie, PATH_LOADSEARCH). If it
notices that the load-path has changed from dump_path, it won't do this.
So if you run `make install' and delete the source directory, your Emacs
won't start, because it will still be looking for source/lisp.
(IIRC, the uninstalled Emacs used to have a load-path that also
contained the installation directories if they existed. This was wrong
and has been removed, but it does mean that changing load-path during
dumping probably did not use to break your Emacs. But
--enable-locallisppath is better anyway.)
So I suggest:
1) In src/lread.c, removing "dump_path" and associated code.
2) In loadup.el, if load-path changes during the loading of
site-load/site-init, print a warning that the changes will be ignored in
the dumped Emacs, and recommending use of --enable-locallisppath if the
changes were intended to be permanent.
Any objections?
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#16107: changing load-path during dumping
2013-12-11 0:57 bug#16107: changing load-path during dumping Glenn Morris
@ 2013-12-11 14:50 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2013-12-11 14:50 UTC (permalink / raw)
To: Glenn Morris; +Cc: 16107
> I think this behaviour does not make sense, and that it would be better
> to remove it.
[...]
> Any objections?
No, I think we can drop it.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-11 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 0:57 bug#16107: changing load-path during dumping Glenn Morris
2013-12-11 14:50 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).