jidanni | 20 Oct 01:20
Favicon
Gravatar

upgrading emacs when emacs is still running

Every time on Debian I use aptitude to
The following packages will be upgraded:
  emacs-snapshot  emacs-snapshot-bin-common (for emacs-snapshot)
  emacs-snapshot-common (for emacs-snapshot, emacs-snapshot-el)
  emacs-snapshot-el
I have to remember to exit any running emacs sessions first, lest
later encountering problems when old emacs reads new .elcs, etc.
Updating Firefox never has such problems.
OK, hard to work around, also too much fuss to put warnings into the
Debian update script: "a running emacs session was detected, proceed?"

Glenn Morris | 20 Oct 05:44
Picon

bug#9801: upgrading emacs when emacs is still running


This is not the Debian bug tracker.

Sven Joachim | 20 Oct 09:12
Picon
Picon

Re: upgrading emacs when emacs is still running

On 2011-10-20 01:20 +0200, jidanni <at> jidanni.org wrote:

> Every time on Debian I use aptitude to
> The following packages will be upgraded:
>   emacs-snapshot  emacs-snapshot-bin-common (for emacs-snapshot)
>   emacs-snapshot-common (for emacs-snapshot, emacs-snapshot-el)
>   emacs-snapshot-el
> I have to remember to exit any running emacs sessions first, lest
> later encountering problems when old emacs reads new .elcs, etc.
> Updating Firefox never has such problems.
> OK, hard to work around, also too much fuss to put warnings into the
> Debian update script: "a running emacs session was detected, proceed?"

FWIW, there used to be one, but it was removed in the 20080613 snapshot:

$ git show 241c879e25
commit 241c879e25b8b40dbff3871277c911c1b8a333eb
Author: Romain Francoise <romain <at> orebokech.com>
Date:   Fri Jun 13 19:24:40 2008 +0200

    Drop check for running emacsen in preinst

    lsof hangs if the system has unreachable NFS mounts, which happens more
    often than one may think.  As this prevents installation of the package,
    a rather grave bug, let's drop the check instead of trying to tune
    lsof's parameters.

diff --git a/emacs.preinst b/emacs.preinst
old mode 100644
new mode 100755
(Continue reading)

Romain Francoise | 20 Oct 19:21
Picon
Favicon

Re: upgrading emacs when emacs is still running

... and fwiw, I disagree with 2008-me; pgrep and a simple readlink on
/proc/$pid/exe would probably work well enough for that purpose.

--

-- 
Romain Francoise <rfrancoise <at> debian.org>
http://people.debian.org/~rfrancoise/


Gmane