From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping Emacs Date: Thu, 26 Oct 2023 13:25:50 +0000 Message-ID: <87lebpbjmp.fsf@localhost> References: <8734xz2guk.fsf@localhost> <874jidd2ym.fsf@localhost> <837cn9h9ko.fsf@gnu.org> <87r0lhblje.fsf@localhost> <83zg05fs0y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6941"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 66742@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 26 15:24:44 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qw0Lr-0001ap-VO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Oct 2023 15:24:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qw0Lk-0006Wu-Fj; Thu, 26 Oct 2023 09:24:36 -0400 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 1qw0Lf-0006WU-VX for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 09:24:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qw0Lf-0007qH-Mz for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 09:24:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qw0MA-0007gh-FK for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 09:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2023 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66742 X-GNU-PR-Package: emacs Original-Received: via spool by 66742-submit@debbugs.gnu.org id=B66742.169832669529530 (code B ref 66742); Thu, 26 Oct 2023 13:25:02 +0000 Original-Received: (at 66742) by debbugs.gnu.org; 26 Oct 2023 13:24:55 +0000 Original-Received: from localhost ([127.0.0.1]:60982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qw0M3-0007gE-4L for submit@debbugs.gnu.org; Thu, 26 Oct 2023 09:24:55 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:40711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qw0M0-0007fz-Uy for 66742@debbugs.gnu.org; Thu, 26 Oct 2023 09:24:54 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 84E83240101 for <66742@debbugs.gnu.org>; Thu, 26 Oct 2023 15:24:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698326656; bh=8u4dqxyGSE6n6aMB/QbHWmU1gCX9nsOnM5AAyqnHhKQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=aR/gLgk6gEsoNCZ/6WdaCSglMSSrE7jZQFKES+9ufIn9TNqn6Q5pjRJin7i5X0zZD 1zbPAo0mdbMc58umo4ElFyFKgQ/GhU10ubp3AAMJ4veGVifSU2RZl7bUwETAjZWKDT xLEx/LaSUD0z5Ru/zjXQ3m3yqArmlRpeA2Dhyfdj+HouWM8tXwgrV9fpreqdabF0ZZ X3p9e8c1D4sKzW2pVIN4yWrjbh3rZCIsBFe2xqkO7fujNjmeKAfCcCLkLSSYIfgmP6 uvoKGTRjXxe5AK6aR6zBafk7jLJo5fyJewlQlR9/WqCm7ouYageBUBI9HoP6sPQe9q rjozxQma2rwCg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SGRMz3Lhzz6txC; Thu, 26 Oct 2023 15:24:15 +0200 (CEST) In-Reply-To: <83zg05fs0y.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273281 Archived-At: Eli Zaretskii writes: >> This is a surprise to me! >> Is it documented anywhere? > > What do you want to document? I think we misunderstand each other. >> I thought that we should expect the value to >> be evaluated unless explicitly wrapped into (eval-when-compile ...). > > At what time do you think defcustom's value is evaluated? Load time, even for pdumped libraries. >> Also, I just looked up defvar instances across Emacs and I am seeing >> multiple cases when the value is calculated dynamically, assuming >> loading time: > > Of course, it's loading time. But AFAIU you were talking about > evaluation during dumping, i.e. when Emacs is built. No. It is not what I am talking about. In this bug report, I am talking about re-dumping the already built Emacs with the aim of adding extra arbitrary libraries. According to manual page for dump-emacs-portable, If you want to use this function in an Emacs that was already dumped, you must run Emacs with the =E2=80=98-batch=E2=80=99 option. This implies that re-dumping is one of the intended use-cases. > ... This is only > relevant for defcustom's in packages that are preloaded, because those > packages are loaded at build time, not at run time. So for those > packages, and only for those packages, any defcustom whose default > value is not a constant, should be re-evaluated at startup, to make > sure the value is suitable for the system on which Emacs runs. I can see your point, although I wish it were not so tricky. In any case, even within a scope of this bug report, the reproducer I provided does not load any extra packages. So, at least, there is some bug with preloaded packages. Maybe, the caveats with runtime/re-dump time evaluation should be documented. > ... > This is not relevant, since packages that aren't preloaded will be > loaded at run time, and therefore the values will be evaluated in the > correct context. If you are talking about these, then I don't > understand what prompted you to raise this issue to begin with, and in > a thread that discusses dumping. ... but ideally, I wish that we would not have to patch the existing libraries in order to preload them. Otherwise, `dump-emacs-portable' function is not very useful in practice (except for building Emacs) and will most likely lead to subtle bugs if attempted by users. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at