Subject: Re: bug#58073: 29.0.50; Uninstalled emacs sends startup messages to stderr

From: Eli Zaretskii <[email-masked]>
Date: Sun, 25 Sep 2022 19:02:28 +0300

> From: Jonas Bernoulli <[email-masked]>
> Date: Sun, 25 Sep 2022 17:15:18 +0200
> 
> I usually run emacs without installing it, via a symlink, which is
> placed on PATH and which points at the executable in the checkout.
> Due to reasons that aren't important here, I recently had to replace the
> symlink with a wrapper script, and that resulted in these messages being
> send to stderr.
> 
>   Loading loadup.el (source)...
>   Dump mode: nil
>   Using load-path (...)
>   Loading emacs-lisp/debug-early...
>   ...
>   Finding pointers to doc strings...done
> 
> Running the executable directly also results in these messages.
> 
> I then changed my wrapper script to use an intermediate symlink, with
> the resulted that the messages were not being shown for a while again,
> but today I updated emacs again and now the messages are always shown.
> Using a symlink no longer suppresses them.
> 
> Are this messages shown intentionally?  Is it already possible to
> suppress them?  If not, could something be added to allow suppressing
> them?

Is your Emacs built with or without native-compilation?

The messages mean that Emacs either cannot find its pdumper file, or
cannot find the preloaded *.eln files, and therefore loads all the
preloaded files explicitly during startup.  The question is why.  My
guess is that the way you invoke Emacs is not supported by the startup
code.  This became more complicated with the pdumper build, and yet
more with the native-compilation build, because where formerly Emacs
needed only to find its executable file, it now needs also to find the
pdumper file and all the preloaded *.eln files.

> (I prefer to run the uninstalled executable, because that allows me
> to jump to a definition and then immediately view its history.)

Then may I suggest a shell alias?  Emacs has special support for
running from the build tree, but in your case it somehow doesn't
realize that.