unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: "Andreas Schwab" <schwab@linux-m68k.org>
Cc: Eli Zaretskii <eliz@gnu.org>, rpluim@gmail.com, emacs-devel@gnu.org
Subject: Re: Finding the dump
Date: Sun, 27 Jan 2019 10:26:47 -0800	[thread overview]
Message-ID: <4f30b2b598e71d2c6ad766a3da8e4a33.squirrel@dancol.org> (raw)
In-Reply-To: <87womqvyy4.fsf@igel.home>

> On Jan 27 2019, Eli Zaretskii <eliz@gnu.org> wrote:
>
>>> From: Andreas Schwab <schwab@linux-m68k.org>
>>> Cc: rpluim@gmail.com,  emacs-devel@gnu.org
>>> 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.




  parent reply	other threads:[~2019-01-27 18:26 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 13:15 Finding the dump Stefan Monnier
2019-01-23 13:46 ` Robert Pluim
2019-01-23 15:13   ` Stefan Monnier
2019-01-23 13:55 ` Andreas Schwab
2019-01-23 15:17   ` Stefan Monnier
2019-01-23 15:37     ` Andreas Schwab
2019-01-23 15:44 ` Andreas Schwab
2019-01-23 16:07   ` Stefan Monnier
2019-01-23 15:50 ` Eli Zaretskii
2019-01-23 16:02   ` Stefan Monnier
2019-01-23 16:04   ` Paul Eggert
2019-01-23 16:38   ` Robert Pluim
2019-01-23 17:24     ` Eli Zaretskii
2019-01-26 12:17       ` Eli Zaretskii
2019-01-26 15:03         ` Andreas Schwab
2019-01-26 15:12           ` Eli Zaretskii
2019-01-26 15:44             ` Andreas Schwab
2019-01-26 17:02               ` Eli Zaretskii
2019-01-26 20:44                 ` Andreas Schwab
2019-01-27 15:20                   ` Eli Zaretskii
2019-01-27 15:46                     ` Andreas Schwab
2019-01-27 15:59                       ` Eli Zaretskii
2019-01-27 16:37                         ` Andreas Schwab
2019-01-27 16:56                           ` Eli Zaretskii
2019-01-27 17:00                             ` Andreas Schwab
2019-01-27 18:26                           ` Daniel Colascione [this message]
2019-01-27 18:46                             ` Andreas Schwab
2019-01-27 18:58                               ` Stefan Monnier
2019-01-27 19:27                               ` Daniel Colascione
2019-01-27 19:42                                 ` Stefan Monnier
2019-01-28  1:06                                   ` Daniel Colascione
2019-01-27 20:12                                 ` Andreas Schwab
2019-01-27 21:25                                   ` Daniel Colascione
2019-01-27 21:37                                     ` Andreas Schwab
2019-01-27 23:47                                       ` Paul Eggert
2019-01-28  0:32                                         ` Daniel Colascione
2019-01-28  1:21                                           ` Paul Eggert
2019-01-28  1:29                                             ` Daniel Colascione
2019-01-28 19:03                                             ` Richard Stallman
2019-01-28 19:23                                               ` Paul Eggert
2019-01-28 23:09                                                 ` Stefan Monnier
2019-01-29  8:50                                                 ` Richard Stallman
2019-01-31  2:21                                                   ` Paul Eggert
2019-02-01  0:23                                                     ` Richard Stallman
2019-02-01  2:09                                                       ` Paul Eggert
2019-02-02  3:25                                                         ` Richard Stallman
2019-02-02  7:23                                                           ` Eli Zaretskii
2019-02-03  4:36                                                             ` Richard Stallman
2019-02-01  7:22                                                       ` Eli Zaretskii
2019-02-02  3:25                                                         ` Richard Stallman
2019-02-02  7:22                                                           ` Eli Zaretskii
2019-02-03  4:36                                                             ` Richard Stallman
2019-01-28  3:38                                         ` Eli Zaretskii
2019-01-28  4:13                                           ` Paul Eggert
2019-01-28  6:28                                             ` Daniel Colascione
2019-01-28 15:35                                             ` Eli Zaretskii
2019-01-28 15:57                                               ` Paul Eggert
2019-01-28 16:02                                                 ` Daniel Colascione
2019-01-28 17:39                                                   ` Paul Eggert
2019-01-28 19:46                                                     ` Daniel Colascione
2019-01-28  8:53                                         ` Stefan Monnier
2019-01-28 12:57                                           ` Fu Yuan
2019-01-28 15:41                                           ` Eli Zaretskii
2019-01-28 18:20                                             ` Stefan Monnier
2019-01-28 19:53                                               ` Eli Zaretskii
2019-01-28 22:30                                                 ` Stefan Monnier
2019-01-27  9:55           ` Stefan Monnier
2019-01-27 10:32             ` Andreas Schwab
2019-01-27 10:44               ` Stefan Monnier
2019-01-27 10:54                 ` Andreas Schwab
2019-01-27 15:33                   ` Eli Zaretskii
2019-01-27 18:52                     ` Stefan Monnier
2019-01-27 19:25                       ` Eli Zaretskii
2019-01-27 18:47                   ` Stefan Monnier
2019-01-26 17:27         ` Michael Heerdegen
2019-01-26 17:29           ` Eli Zaretskii
2019-01-26 18:05             ` Michael Heerdegen
2019-01-26 18:13               ` Eli Zaretskii
2019-01-26 20:05                 ` Michael Heerdegen
2019-01-26 20:43                   ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-01-30  3:00 Van L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f30b2b598e71d2c6ad766a3da8e4a33.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).