From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36828: 27.0.50; Uninstalled emacs shows installed documentation Date: Sun, 28 Jul 2019 19:50:12 +0300 Message-ID: <837e82kssb.fsf@gnu.org> References: <87lfwitcyf.fsf@telefonica.net> <83blxekwhz.fsf@gnu.org> <87ef2ataoj.fsf@telefonica.net> 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="227346"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36828@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 28 18:51:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrmOC-000wxt-1J for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 18:51:16 +0200 Original-Received: from localhost ([::1]:46080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrmOA-0005xV-LQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 12:51:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42198) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrmO0-0005xD-Np for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 12:51:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrmNy-0005MD-1g for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 12:51:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrmNx-0005M1-O4 for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 12:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrmNx-0005iA-L6 for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 12:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2019 16:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36828 X-GNU-PR-Package: emacs Original-Received: via spool by 36828-submit@debbugs.gnu.org id=B36828.156433263721918 (code B ref 36828); Sun, 28 Jul 2019 16:51:01 +0000 Original-Received: (at 36828) by debbugs.gnu.org; 28 Jul 2019 16:50:37 +0000 Original-Received: from localhost ([127.0.0.1]:47062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrmNZ-0005hR-1m for submit@debbugs.gnu.org; Sun, 28 Jul 2019 12:50:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrmNX-0005hD-06 for 36828@debbugs.gnu.org; Sun, 28 Jul 2019 12:50:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hrmNR-000566-E6; Sun, 28 Jul 2019 12:50:29 -0400 Original-Received: from [176.228.60.248] (port=4871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hrmNQ-0008In-RG; Sun, 28 Jul 2019 12:50:29 -0400 In-reply-to: <87ef2ataoj.fsf@telefonica.net> (message from =?UTF-8?Q?=C3=93scar?= Fuentes on Sun, 28 Jul 2019 17:56:28 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163981 Archived-At: > From: Óscar Fuentes > Cc: 36828@debbugs.gnu.org > Date: Sun, 28 Jul 2019 17:56:28 +0200 > > Eli Zaretskii writes: > > > Emacs tries the installation directory first, and only falls back to > > the build directory if the installation directory doesn't exist. > > Does this happen if Emacs was never installed from that build directory? AFAIR, Emacs doesn't know. It just looks in several directories according to some order, and that order makes sense in the usual use cases. Yours is an unusual one. > And is there a good reason for doing that? When Emacs is executed from > the build directory, I expect that it works on the contents of that > directory (and the correspondent source directory, for out-of-tree > builds.) We are talking about data-directory. The convoluted logic for its calculation is in callproc.c, near the end. You will see that there are quite a few use cases supported by that code. There could be EMACS_DATA in the environment; there could be a list of directories to look in, not just a single directory; the build directory may or may not be the same as the source directory. The value you see is probed early on during the startup, when Emacs didn't yet figure out the value of installation-directory, and so cannot yet employ the logic you want it to. For an uninstalled Emacs that directory usually doesn't exist, so later Emacs tries again after figuring out the installation-directory. Bottom line: I'm not sure we should rock that particular boat for an unusual use case such as yours.