From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: Updating Elisp files while Emacs is running Date: Mon, 14 Mar 2016 17:21:52 +0000 Message-ID: References: <87k2l5w1xq.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1457976144 22615 80.91.229.3 (14 Mar 2016 17:22:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2016 17:22:24 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Phillip Lord Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 18:22:18 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1afWC9-0003kV-G5 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 18:22:17 +0100 Original-Received: from localhost ([::1]:42674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWC9-0002Rl-0i for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 13:22:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWBw-0002Rb-VV for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afWBv-0003xl-If for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:22:04 -0400 Original-Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:34225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWBv-0003xg-5U for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 13:22:03 -0400 Original-Received: by mail-lb0-x22d.google.com with SMTP id k12so15660423lbb.1 for ; Mon, 14 Mar 2016 10:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YQpADVIPmlh6Tp95gYYRfF4TyGncOXaEIjdPRxEra18=; b=0fy66g8KOb7TGyRVS400W6azYjwloAWVDxIZljfBS1B/o6ll8YQPEk3vAQR579ALEl +swNVZm1CG5xN9SvksE0hms7N/af1JFo23M5XYHMi+kANhcSHOQLswFBcWtsTWWjJuo7 wxpN0MSVS2JKCttcDsllM+ydKcykx5jAj52/052XnzdVstb0PPS/w4ouivx5R2xD4Goj 3k8jegS6vK99F31PUesCBw+wuEqNpfT96IMLLo4fCqCeboaV8glFGsHAvEJ2QHs7Gv4u sDEZIrv8rTs3Sj0m6j1Aa2KPXwZb0UpHM7+s7k91aUQriYHVDiCZPrBvSL2IWwQeP4Z8 Ol/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YQpADVIPmlh6Tp95gYYRfF4TyGncOXaEIjdPRxEra18=; b=bHUSDhlyBCMqgVeHSV+aYTZpuklcKwGpsPJ6UpIOcl64zJl5ivXdVRvIsYYrRmttbJ v+SezjKlu1KXQilR+LMJJ+hiRBLC3CsZdqyRigGRa+bbDDBkO++A+RJIRsQVYBYzS0NK MnewbzZE04u6sRClrgWrDeQrJBviryOHIjoSukkwM31wlIYKBbjSdx3jcah8McKfXPfo T5yiC8WLPiPuSuvCyk+1ORI8x1HY3l4VFoUR6P2l/t5ihTYe1k8BxfmKsaPttg7EREfg 9N/0m4Ll5+x6OcTbG8FSyncqma4KKOalDwik2yS4jJCbCqhyWtASrRZr9bXMtH6bOUPQ CxjQ== X-Gm-Message-State: AD7BkJINeSEpwmrQqH+HaAjH+mcGuEXltPrF7sPI07uqaBScx6e8E3Uz5JsPGC3B97fbvRSugfErzQqY20Swvw== X-Received: by 10.25.151.135 with SMTP id z129mr6723689lfd.122.1457976121845; Mon, 14 Mar 2016 10:22:01 -0700 (PDT) In-Reply-To: <87k2l5w1xq.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109572 Archived-At: Phillip Lord schrieb am Mo., 14. M=C3=A4rz 201= 6 um 15:48 Uhr: > > > > > Philipp Stephani 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 Elis= p > > 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 arou= nd > > or the byte code format changes, but that seems to be comparatively rar= e. > > > 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.