emacs-devel
[Top][All Lists]
Advanced

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

Re: PACKAGE-FEATURES, and hot update of Emacs packages


From: Phil Sainty
Subject: Re: PACKAGE-FEATURES, and hot update of Emacs packages
Date: Sun, 28 Nov 2021 20:22:01 +1300
User-agent: Orcon Webmail

On 2021-11-28 09:36, Qiantan Hong wrote:
This require the user to reload the file.

Yes indeed.  Or rather, it *supports* them reloading the file.

Currently if the old package is not unloaded, the feature is still
present and (require p) does nothing.

Certainly `require' won't do anything, but nothing prevents you from
using `load-library' for for the same list of libraries that you were
planning to unload.

You can't be certain that's going to be safe, though.  Reloading a
library is expected to be safe when the code is unchanged, but there's
no requirement that I'm aware of to support loading new code over the
old code -- that will often be fine in practice, but there's loads of
scope for it not to be.

And as before, I don't think it's valid to unload things (even if you
could be confident that everything supported being unloaded) because
you destroy the configuration.

I can't think of a way to reliably do what you're suggesting in the
general case.  Each approach will work in certain circumstances, but
I don't think any approach is *generally* reliable.

Libraries could probably declare themselves as supporting reloading
if the author believed that to be the case, and you could have an
automated reload sequence if everything claimed to support it.


-Phil




reply via email to

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