unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: "Paul Eggert" <eggert@cs.ucla.edu>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Daniel Colascione <dancol@dancol.org>,
	Andreas Schwab <schwab@linux-m68k.org>,
	rpluim@gmail.com, emacs-devel@gnu.org
Subject: Re: Finding the dump
Date: Sun, 27 Jan 2019 17:29:48 -0800	[thread overview]
Message-ID: <8d0f91f06af34e9db64e69544694bf0e.squirrel@dancol.org> (raw)
In-Reply-To: <725a9f97-8bb5-4592-2512-dbd422023f51@cs.ucla.edu>

> Daniel Colascione wrote:
>> we_already_  do the moral equivalent of realpath(argv[0]), in
>> init_cmdargs, which sets invocation-directory and from there various
>> internal paths, including installation-directory.
>
> Emacs can run without any of that stuff, so people can run Emacs 26 with
> argv[0]
> being any string they like. That will stop working if Emacs can't run when
> argv[0] is "wrong".

Emacs can run with a wrong argv[0] if it's installed in its final
location, since we use the installation prefix as a fallback path. Nobody
is arguing that we should remove this feature. We're talking about what we
should do in the case that somebody is running an uninstalled Emacs, and
in this case, an executable-relative search *is* standard practice.

> The GNU Coding Standards have long said that a program's behavior
> shouldn't
> depend its name (i.e., on the contents of argv[0]),

Yet the original GNU program, Emacs, until just now, behaved differently
if it was called temacs. :-)

Anyway, I generally agree that program behavior shouldn't change depending
on its name --- that's why I changed how temacs works --- but finding the
location of the program doesn't count as "behavior". Emacs doesn't care
whether you call it "emacs", "trogdor", or "vim" so long as it can find
"lib-src", "info", and "etc" relative to wherever the binary happens to
be.

> and there are
> advantages to
> sticking to standard practices even if some programs depart from them.

I agree that we should stick to standard practice. That's why we should
continue looking at argv[0] to find Emacs-internal files in uninstalled
Emacs. We have some bugs that make this not quit work today: in order to
successfully run an uninstalled Emacs, you need to 1) have the correct
argv[0], _and_ 2) keep Emacs in its build location. It's #2 that's the
bug, not #1.




  reply	other threads:[~2019-01-28  1:29 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
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 [this message]
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=8d0f91f06af34e9db64e69544694bf0e.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --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).