From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Regression in dump-emacs-portable Date: Fri, 17 Feb 2023 16:31:08 +0200 Message-ID: <83bkls1hzn.fsf@gnu.org> References: <83ttzocomk.fsf@gnu.org> <834jrncd6a.fsf@gnu.org> <83r0up39qe.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35412"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 17 15:32:01 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pT1mK-0008xG-PH for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Feb 2023 15:32:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT1lc-00063D-HE; Fri, 17 Feb 2023 09:31:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT1lZ-0005zU-Vh for emacs-devel@gnu.org; Fri, 17 Feb 2023 09:31:14 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT1lZ-0002iB-ME; Fri, 17 Feb 2023 09:31:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2SOH5PfYcVhIteamfuH+4RXlPC1bE+I7Tkj1lyvsMcg=; b=Ho7bCq3n2cse 1IHq8fiXASq4kwC2V6k/ykMfpj1hyMrtEIZtdT9FStqWLVh/6kPVmA8aP36ydY0cqcRiFZZmawfJi rD8Z8WFKJ3E+yrEUbVdp5xmaSw7KpoAXMpvkkhU9pZ8eUlDmzIXiM526LCU4gMAl2yAhKgEDxRzuJ Tp11ZChQwfSVBP97IMwt0geuLhqr+wsUUkG2CESOngz5cdm5eeRIiOWg9AbG+kmshzqgZQQSMZV/J ugx56+20JbmQSoikK1lZvdmBVOsoRTLf8d+2Mh6byeDdzVoUcw5RfLfKIRSyC+XqbpIGL/XrbtAru U/NcfoEgS7X8GrZIvBDwSA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT1lV-0005ya-Pm; Fri, 17 Feb 2023 09:31:12 -0500 In-Reply-To: (message from Lynn Winebarger on Fri, 17 Feb 2023 08:22:56 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303488 Archived-At: > From: Lynn Winebarger > Date: Fri, 17 Feb 2023 08:22:56 -0500 > Cc: emacs-devel@gnu.org > > On Thu, Feb 16, 2023 at 6:45 PM Lynn Winebarger wrote: > > > > On Thu, Feb 16, 2023 at 10:34 AM Eli Zaretskii wrote: > > > > > > > From: Lynn Winebarger > > > > Date: Thu, 16 Feb 2023 10:05:00 -0500 > > > > Cc: emacs-devel > > > > > > > > I do see something in the redumped emacs that seems like a bug to me. The process I use for creating the > > > > dump uses the -Q flag. But some of the settings I see in "emacs -Q --dump-file ..." are not the ones I see > > > > with just "emacs -Q". Some are pretty basic - menu-bar-mode, tool-bar-mode, global-font-lock-mode, > > > > transient-mark-mode are all nil in the redumped process but not the baseline. > > > > > > That is exactly the problem with re-dumping: stuff that was > > > initialized on the first start gets dumped, and then works differently > > > when Emacs is restarted from the second dump. > > > > That appears to be a consequence of setting > > custom-delayed-init-variables to t in startup, without saving a copy > > to be restored by an after-pdump-load-hook. Those modes have an > > init-value expression involving "(not noninteractive)" that is > > evaluated during batch mode startup but not in the post-redump > > startup. > Something like this (untested): > diff --git a/lisp/custom.el b/lisp/custom.el > index 0522bdd447b..c16bc8f8560 100644 > --- a/lisp/custom.el > +++ b/lisp/custom.el > @@ -138,6 +138,19 @@ custom-delayed-init-variables > "List of variables whose initialization is pending until startup. > Once this list has been processed, this var is set to a non-list value.") > > +(defvar custom-pdumped-delayed-init-variables nil > + "List of all variables whose initialization will be pending until > +a startup following a redump. This list is prepended to I don't understand what will this solve. Why does it matter when exactly is a variable initialized, if in any case that will happen before re-dumping?