[Top][All Lists]

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

Re: Finding the dump

From: Daniel Colascione
Subject: Re: Finding the dump
Date: Sun, 27 Jan 2019 10:26:47 -0800
User-agent: SquirrelMail/1.4.23 [SVN]

> On Jan 27 2019, Eli Zaretskii <address@hidden> wrote:
>>> From: Andreas Schwab <address@hidden>
>>> Cc: address@hidden,  address@hidden
>>> Date: Sun, 27 Jan 2019 16:46:48 +0100
>>> >> https://build.opensuse.org/package/view_file/openSUSE:Factory/emacs/emacs.sh?expand=1
>>> >
>>> > I guess scripts like that will need to use the --dump-file
>>> > command-line argument.
>>> Having to use --dump-file is awkward.
>> When you type it on the command line, yes.  But we are talking about a
>> shell script, where you add the --dump-file option once and for all.
> It's still awkward, because you have to know the full name, which
> depends on the version and architecture.

Launcher scripts are annoying: they break tools that want to see Emacs as
an executable, e.g., ldd, or gdb. I'd much rather Emacs Just Work.

People should have to use --dump-file only if they're using a non-default
Emacs dump, e.g., if they're dumping after loading their customizations.

There's some confusion on this thread. argv[0] *is* reliable, at least on
every system I've seen. Here's the algorithm: look at argv[0]: if it's not
an absolute path, make it absolute by prepending the startup CWD. The
difficulty is that the file to which this now-absolute name points might
be  symlink, so finding emacs.pdmp relative to it won't work. Most
programs in this situation just use realpath(3) or equivalent on that
executable name and find data files relative to the result, and this
approach should work fine for us too.

reply via email to

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