all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: 16107@debbugs.gnu.org
Subject: bug#16107: changing load-path during dumping
Date: Tue, 10 Dec 2013 19:57:46 -0500	[thread overview]
Message-ID: <vmvbyw8ar9.fsf@fencepost.gnu.org> (raw)

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?





             reply	other threads:[~2013-12-11  0:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11  0:57 Glenn Morris [this message]
2013-12-11 14:50 ` bug#16107: changing load-path during dumping 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=vmvbyw8ar9.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=16107@debbugs.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.