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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 02 Oct 2022 17:54:43 +0300

> From: Jonas Bernoulli <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 02 Oct 2022 16:50:19 +0200
> 
>   #!/bin/sh
>   unset EMACSLOADPATH
>   exec -a "emacs" "/home/jonas/src/emacs/emacs/src/emacs" "$@"
> 
> One problem with that approach is that the wrapper cannot be named
> "emacs".  If it is named "emacs", then that somehow trips up Emacs
> and it loads all the preloaded files explicitly during startup (so
> it appears that it cannot find the pdumper file in this case).
> 
> Eli, this isn't terribly important, but I was wondering if there is
> something you could do so the name of the wrapper does not matter?
> There might be other legitimate uses of a wrapper around the binary
> from the build directory, other than "I currently have not other
> choice because of what my distro does".

One thing I can suggest is to use the --dump-file=FILE command-line
option inside the script to direct Emacs to its .pdmp file.  If you
don't do that, Emacs tries to intuit it using the value of argv[0] it
receives from the OS, and I guess your naming somehow trips that?