emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regression in dump-emacs-portable


From: Lynn Winebarger
Subject: Re: Regression in dump-emacs-portable
Date: Thu, 23 Feb 2023 08:21:52 -0500

On Thu, Feb 16, 2023 at 10:34 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Lynn Winebarger <owinebar@gmail.com>
> > Date: Thu, 16 Feb 2023 10:05:00 -0500
> > Cc: emacs-devel <emacs-devel@gnu.org>
> >
> > 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.
>
> It might sound like a minor issue, but it is actually a tip of a very
> large iceberg.  When we run temacs to produce the dump file, we jump
> through many hoops to avoid these problems, and then when dumped Emacs
> is started, it jumps through some more hoops.  Those are all the
> init_FOO_once and pdumper_do_now_and_after_load calls.  All this works
> differently when Emacs starts from a re-dumped dump file.  For
> example, features that are toggled might be turned off in the second
> start because the startup code assumes they are originally turned off
> and toggling them turns them on.

I don't understand why the initialization function for minor mode
variables toggles, or why a minor mode command invoked in startup
without argument would toggle.  That's only supposed to be done when
the mode command is invoked interactively without argument.
It's true that there are only a few customization variables in the
baseline dump file that use custom-initialize-delay.  But one way of
dealing with these issues would be to do a (conservative) analysis of
initialization expressions for dependencies on values that are
dependent on run-time initialization and re-initialize them
accordingly.  The patch I submitted in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61721 does the first
step.  In my test redump (with nothing additional loaded),
global-font-lock-mode and tooltips-mode are set correctly at least.

I added a bug report specifically about the failure of dumping for
overlays and treesit-compiled-query pseudovectors.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61733

Lynn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]