GNU bug report logs - #16107
changing load-path during dumping

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Wed, 11 Dec 2013 00:58:02 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16107 in the body.
You can then email your comments to 16107 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16107; Package emacs. (Wed, 11 Dec 2013 00:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Glenn Morris <rgm <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Dec 2013 00:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: GNU Bug Tracker <submit <at> debbugs.gnu.org>
Subject: changing load-path during dumping
Date: Tue, 10 Dec 2013 19:57:46 -0500
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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16107; Package emacs. (Wed, 11 Dec 2013 14:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 16107 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 16107 <at> debbugs.gnu.org
Subject: Re: bug#16107: changing load-path during dumping
Date: Wed, 11 Dec 2013 09:50:07 -0500
> 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




bug marked as fixed in version 24.4, send any further explanations to 16107 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 18:26:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Jan 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.