Subject: Re: bug#68200: 30.0.50; Emacs reloads init file when calling `documentation'

From: Eli Zaretskii <[email-masked]>
Date: Tue, 02 Jan 2024 15:09:27 +0200

> Date: Tue, 02 Jan 2024 02:53:50 +0100
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> Hello,
> 
> I see this problem for a couple of weeks now, never saw it before:
> 
> When I made edits to my config file, any running session of Emacs that
> has loaded this init file (including the same session) will have an
> issue: any action that causes `documentation' being called with one of
> the things defined in my init file as argument will reload the complete
> init file.
> 
> This is a problem: it takes a lot of time and this can happen
> repeatedly, often I have to restart Emacs to be able to continue my work
> normally.  There are a lot of things that trigger the call of
> `documentation' - not only requesting documentation explicitly, but also
> things like `eldoc-mode' or cl-printing expressions.
> 
> I have not been able to find out why the behavior has changed.  The
> reloading happens from C AFAIU.  Please help!

I don't think I understand your description, but maybe running Emacs
under GDB with a breakpoint in Fload, with a condition that it will
only break when the offending file is loaded, will allow you to
produce a backtrace, and we could then take from there, armed with the
list of possible offenders -- the functions in the backtrace.