From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Regression in dump-emacs-portable Date: Fri, 17 Feb 2023 18:44:18 -0500 Message-ID: References: <83ttzocomk.fsf@gnu.org> <834jrncd6a.fsf@gnu.org> <83r0up39qe.fsf@gnu.org> <83bkls1hzn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30145"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 18 00:45:25 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 1pTAPt-0007g1-CK for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Feb 2023 00:45:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTAP7-0001sK-1H; Fri, 17 Feb 2023 18:44:37 -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 1pTAP4-0001nj-MX for emacs-devel@gnu.org; Fri, 17 Feb 2023 18:44:34 -0500 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTAP3-00070d-3B; Fri, 17 Feb 2023 18:44:34 -0500 Original-Received: by mail-pl1-x633.google.com with SMTP id jk12so3345954plb.5; Fri, 17 Feb 2023 15:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FPFcbBdrkOEh0kjDhoIIokfphGSE3MMWK0zc4xCystI=; b=fOhoHpMSaXMReZe3zkb9r3xe4PkMIN0ltiz28hrenoGj8/TAl5ggJEKojwmusvUGvO QDIrJQzILbM8splJB5te+wjdk3wLysnI273+6o02znezuYHJfjHQbcQr8MB4XADqi8vv VmuKuE6qXUT1KqHPRuRIp8jodLstQbgzriYOU7UqEfZ53KcZt8Q+vAXc8uHbrrME7buH w+qMpNpVMp2GJFhXpOuqqbw2ozWegkNWTzAZUaZDP/eIMbmL43tWIYVvzT8Jgww0h0eL bDIcyUwnusYUXKQhB1DLsAJzcV3k9UJqzmXTDuWeBpTBkLG8nuL0gG+eMGeUKasxGzgi R8Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FPFcbBdrkOEh0kjDhoIIokfphGSE3MMWK0zc4xCystI=; b=V6vXxpyBq3PyIr7GhNvCB6YbptzmgI4AwQKmhvoZ8j6qgq4hoUJG2aSpeunHKcXUV7 xBOhGytGOUqDb3/llCcBWSwAqfHlYLCNWKJIjCj3T57+Ft0jbSUqxNX/Lr4XByWrGnay QMso3BMh4AAPXgmsa3IzNvdKzwg4vOdV2f0/FUmfVg5H/SlWekOgRyAWA/Ps/+n+4hf6 4WHE8py1I/tifEtRjqIPP1kBTNtnVzF/fgpMh0TAf9p38OyuJV+PfD4T0y6uVqiWdsvX VrV0Vf4BWITMxrsUFS0xhAMo/AaqW/sCjPU2AjuXdbO9YMU2DK12nwrlmoasxaS1Q+BR flSw== X-Gm-Message-State: AO0yUKWBJmPQhLd+hI06Uptz+noN3d1cS2tvJ24C1Vo1XlF+Swxpfq1O OGpGAxUTBRDKJyDHgk71V0y1Nn3uEUSmymea17WOsfGs/s0= X-Google-Smtp-Source: AK7set8OVwvtvbx/HMOJRy07riqkSRK5MJ1FlOhU4QRY3ogcy3LCcVZ59tp7fT2J7XxyHlnwILRfu9eoUdrfxsU3EXI= X-Received: by 2002:a17:90b:1bcf:b0:22c:4a69:6805 with SMTP id oa15-20020a17090b1bcf00b0022c4a696805mr1917040pjb.7.1676677470491; Fri, 17 Feb 2023 15:44:30 -0800 (PST) In-Reply-To: <83bkls1hzn.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=owinebar@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:303515 Archived-At: On Fri, Feb 17, 2023 at 9:31 AM Eli Zaretskii wrote: > 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? You're right with respect to the current definitions of custom-initialize-* functions that will only set variables if they are unbound. The docstring for custom-initialize-delay is: "Delay initialization of SYMBOL to the next Emacs start. This is used in files that are preloaded (or for autoloaded variables), so that the initialization is done in the run-time context rather than the build-time context. This also has the side-effect that the (delayed) initialization is performed with the :set function." But "so the initialization is done in the run-time context" and "to the *next* Emacs start" (emphasis mine) are contradictory unless dumping can only happen once. The first sentence should be "Ensure SYMBOL is set to initial-value at Emacs startup". Otherwise, the "initialization" will only reflect the value of the customization when it was first set, regardless of whether that value reflects the *current* run-time context due to redumping. In particular, currently redumping has to happen in a noninteractive context, so redumping of a customization with an initialization expression referencing the value of 'noninteractive will not be correct when it is later used in an interactive session. Also, any customization variables introduced after a redump that are supposed to be initialized by #'custom-initialize-delay will not be initialized on the next startup, since custom-delayed-init-variables is already set to t in the dump. The current implementation only works for customization variables defined in the initial dump. I'll take a shot at a more thorough rewrite of the customization system to properly support redumping this weekend and send another patch. Lynn