help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating Elisp files while Emacs is running


From: Philipp Stephani
Subject: Re: Updating Elisp files while Emacs is running
Date: Mon, 14 Mar 2016 17:21:52 +0000

Phillip Lord <phillip.lord@russet.org.uk> schrieb am Mo., 14. März 2016 um
15:48 Uhr:

>
>
>
>
> Philipp Stephani <p.stephani2@gmail.com> writes:
> > OS-level package managers such as Debian's dpkg generally replace files
> > unconditionally when upgrading. Typically this is not a problem because
> > running binaries will continue to use the in-memory image, and daemons
> can
> > get restarted or sent a signal without user interaction. However, for
> Emacs
> > the situation seems different: Emacs not only needs its (dumped) binary,
> > but also relies on Elisp files. For Elisp files already loaded when the
> > upgrade is running this typically doesn't cause problems, but when Elisp
> > files aren't already loaded, replacing them causes problems because the
> > directories containing them are versioned (see e.g. lispdir in
> configure.ac),
> > so that when the version changes (even for minor changes, such as
> updating
> > from the recent pretest-1 to pretest-2), the files are no longer at the
> > expected location, and libraries can't be loaded any more, either
> manually
> > or via autoloads. Similar things happen for system-wide ELPA packages (in
> > the package-directory-list directories), because the names of these
> > directories are also versioned. How could this be changed so that
> > unattended upgrades changing the Emacs version are possible while Emacs
> is
> > running? Could the Elisp file directories get names that don't include
> the
> > version number (maybe hidden behind a configure option)? Is it possible
> to
> > install system-wide ELPA packages into directories that don't contain
> > version numbers? Or is there another way, e.g. using a signal to
> > reinitialize the load-path and the package system? I'm aware these
> > suggestions would still cause issues if e.g. Elisp files get moved around
> > or the byte code format changes, but that seems to be comparatively rare.
>
>
> I am not sure I see the issue. When updates to the core occur, then the
> version number changes, so new files will not overwrite existing ones,
> nor will the load-path be changed.
>

That is exactly the problem. Either the version number shouldn't change, or
the load-path needs to be updated. The old files are gone, they can't be
accessed any more after the upgrade.


>
> Likewise, for ELPA, as far as I know -- the load-path is set once during
> package-initialize, so if a new version of a package gets added, Emacs
> will run with the old.
>

Not if the files of the old package have been removed.


>
> If you want an existing Emacs to move to the new packages, that would be
> hard to get right; only a restart is going to make sense here.
>
> Why is that a problem?
>

Because Emacs expects the old files to be there, but they have been
removed. Sorry for being unclear: the old files get removed during the
upgrade.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]