From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.devel Subject: Re: Finding the dump Date: Sun, 27 Jan 2019 17:29:48 -0800 Message-ID: <8d0f91f06af34e9db64e69544694bf0e.squirrel@dancol.org> References: <83munr8jb1.fsf@gnu.org> <838szb8ey9.fsf@gnu.org> <83d0oj62bc.fsf@gnu.org> <87ef8z4g1m.fsf@igel.home> <838sz75u7p.fsf@gnu.org> <877eer4e4x.fsf@igel.home> <835zub5p3i.fsf@gnu.org> <8736pf408v.fsf@igel.home> <83womq3z5c.fsf@gnu.org> <871s4yxfvb.fsf@igel.home> <83o9823xcq.fsf@gnu.org> <87womqvyy4.fsf@igel.home> <4f30b2b598e71d2c6ad766a3da8e4a33.squirrel@dancol.org> <87o982vszn.fsf@igel.home> <87k1ipx3jq.fsf@igel.home> <87bm41wzmv.fsf@igel.home> <608533e75f41da3e36e191f8a670af05.squirrel@dancol.org> <725a9f97-8bb5-4592-2512-dbd422023f51@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="82712"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: SquirrelMail/1.4.23 [SVN] Cc: Eli Zaretskii , Daniel Colascione , Andreas Schwab , rpluim@gmail.com, emacs-devel@gnu.org To: "Paul Eggert" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 02:30:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnvkP-000LK8-L5 for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 02:30:02 +0100 Original-Received: from localhost ([127.0.0.1]:52465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnvkO-0007kP-J9 for ged-emacs-devel@m.gmane.org; Sun, 27 Jan 2019 20:30:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnvkI-0007kI-Mj for emacs-devel@gnu.org; Sun, 27 Jan 2019 20:29:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnvkH-0007Wu-RQ for emacs-devel@gnu.org; Sun, 27 Jan 2019 20:29:54 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:42578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnvkF-0007VU-D2; Sun, 27 Jan 2019 20:29:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=yeg9O8Tb6C/SqKzZOQ2gWvEUdBTAWr9B8s9lhaea9G0=; b=A186YrX9EVwn0sfhu6jma4/Oa7lBI140m6zKGXy32FDVcXnLRRdPBIh1y9dyUKX1roYGEI3ER6X7IfRHQ+bO88lDE3aDc1J7rZXVZrIzM7+cjXTVln70xaaKcsNuUROdxWDmcmA8ZDVTcFk+LTPEP2BOgwWuzcYdktEoJf0EfEk1z4rRyzNrCVKJQPfY8GhekrcZvLDJfrfVAUzKy/Yvjnq07kov97kpabdydfR2lYmpsqoKuMqH2ytna+EBN7+WhAsZjgLas86Usc7SkngsPyhjLqhybu/lkzzfAnLFMvXxO6zQPtO1ZiSdF0XjOF2d/2yfQP0/A6ZWiRMx+C68QA==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnvkC-0002QM-0l; Sun, 27 Jan 2019 17:29:48 -0800 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Sun, 27 Jan 2019 17:29:48 -0800 In-Reply-To: <725a9f97-8bb5-4592-2512-dbd422023f51@cs.ucla.edu> X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232747 Archived-At: > 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.