From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Updating Elisp files while Emacs is running
Date: Mon, 14 Mar 2016 13:58:43 -0600 [thread overview]
Message-ID: <20160314132631168832779@bob.proulx.com> (raw)
In-Reply-To: <CAArVCkSPnF-2y5USYwK7V7VUPDkYSnhA0pXjw-TY5ERnZB-O2Q@mail.gmail.com>
Philipp Stephani wrote:
> Phillip Lord schrieb:
> > 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.
A little more detail here would help. I am guessing that it wasn't a
packaged emacs upgrade that has caused you problems but instead you
removed a version of emacs while that version of emacs was still
running and that removal caused your problem.
Multiple versions may be installed side by side without issues.
Upgrades can install newer versions but will not remove older
versions. That way programs that are still running will continue to
access the associated files for that specific version.
> > 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.
An package upgrade will not remove previous versions. However if you
also told it to remove as well then that removal might be explicitly done.
$ apt-cache show emacs | grep Depends:
Depends: emacs24 | emacs24-lucid | emacs24-nox
Previously:
Depends: emacs23 | emacs23-lucid | emacs23-nox
In Debian an 'upgrade' of the system will not be able to upgrade from
one packaged version of emacs to the next because doing so requires
adding the new package version and 'upgrade' does not allow any
changes to the installed package list, just upgrades of what is
already installed. I always perform an 'upgrade' before running
'dist-upgrade'. A 'dist-upgrade' is required to allow the
installation or removal of different packages. On a dist-upgrade the
emacs package is upgraded with the new Depends: which pulls in the new
version of emacs$VERSION. The previous emacs$OLDVERSION is left
behind on the system. Running emacs processes will continue to use
the old files. Any new invocations will launch the new version.
Now here is what I think may have happened. If subsequently an
'apt-get autoremove' (I always use 'apt-get autoremove --purge' along
with version control of /etc using the 'etckeeper' package) then if
nothing else Depends: upon 'emacs$OLDVERSION' and it was marked as
automatically installed as a dependency then it will be removed
because nothing else installed depends upon it. (If you manually
'apt-get install emacs23' then that package will be marked as manually
installed and will never be a candidate for autoremoval.) Using
autoremove after a dist-upgrade is a good way to clean lint from your
system. Otherwise old versions of packages pile up and you find you
have emacs versions 23, 22, 21, and so forth still hanging around on
your system. I used to be there before I started routinely using
autoremove.
As a shortcut on newer apt-get versions you can use the option
'apt-get install --auto-remove' to combine these operations all at one
time. If this is done then the old package will be removed at the
same time. The old package will be listed in the review list asking
for confirmation before performing the action. The expectation is
that when reviewing the list of packages for removal you will see that
it is removing something that you are still using and choose not to
remove it. If something is listed as a candidate for autoremoval
simply mark it as manually installed. 'apt-get install emacs23' is
sufficient. There is also the 'apt-mark' command to list and
explicitly manage this. Then repeate the autoremove again, see that
the packages you don't want removed are no longer listed as
candidates, and confirm the removal of the now shorter list.
Did I get close? :-)
Bob
P.S. I know the current upstream emacs version is 25. But I am
showing things as they are packaged today. Which is why I tried to
make it somewhat generic with emacs$VERSION and emacs$OLDVERSION.
next prev parent reply other threads:[~2016-03-14 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 13:41 Updating Elisp files while Emacs is running Philipp Stephani
2016-03-14 14:48 ` Phillip Lord
2016-03-14 17:21 ` Philipp Stephani
2016-03-14 18:13 ` Phillip Lord
2016-03-14 18:41 ` Philipp Stephani
2016-03-14 19:58 ` Bob Proulx [this message]
2016-03-14 16:48 ` Eli Zaretskii
2016-03-14 17:22 ` Philipp Stephani
2016-03-14 18:04 ` Eli Zaretskii
2016-03-14 18:44 ` Philipp Stephani
2016-03-14 18:55 ` Eli Zaretskii
[not found] ` <mailman.7507.1457966906.843.help-gnu-emacs@gnu.org>
2016-03-15 7:39 ` Joost Kremers
2016-03-15 13:01 ` Stefan Monnier
2016-03-15 21:51 ` Bob Proulx
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160314132631168832779@bob.proulx.com \
--to=bob@proulx.com \
--cc=help-gnu-emacs@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.
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).