From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, 66742@debbugs.gnu.org
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 [thread overview]
Message-ID: <87lebpbjmp.fsf@localhost> (raw)
In-Reply-To: <83zg05fs0y.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> 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 ‘-batch’ 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.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-10-26 13:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 9:26 bug#66742: 30.0.50; transient-mark-mode is not enabled after re-dumping Emacs Ihor Radchenko
2023-10-26 9:11 ` Gerd Möllmann
2023-10-26 11:42 ` Ihor Radchenko
2023-10-26 12:06 ` Eli Zaretskii
2023-10-26 12:44 ` Ihor Radchenko
2023-10-26 13:10 ` Eli Zaretskii
2023-10-26 13:15 ` Eli Zaretskii
2023-10-27 9:04 ` Ihor Radchenko
2023-10-27 10:37 ` Eli Zaretskii
2023-10-27 10:53 ` Ihor Radchenko
2023-10-27 10:56 ` Eli Zaretskii
2023-10-27 10:59 ` Mauro Aranda
2023-10-27 11:08 ` Ihor Radchenko
2023-10-26 13:25 ` Ihor Radchenko [this message]
2023-10-26 13:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lebpbjmp.fsf@localhost \
--to=yantar92@posteo.net \
--cc=66742@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gerd.moellmann@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).