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: Sat, 26 Oct 2019 11:51:50 +0300 Message-ID: <83v9sbvqhl.fsf@gnu.org> References: <87lfwitcyf.fsf@telefonica.net> <83blxekwhz.fsf@gnu.org> <87ef2ataoj.fsf@telefonica.net> <837e82kssb.fsf@gnu.org> <87a7cxu16y.fsf@telefonica.net> <87h875qbrv.fsf@gmail.com> <83r268kiss.fsf@gnu.org> <875znkrj6y.fsf@gmail.com> <83mugwkh8u.fsf@gnu.org> <871ry8rfge.fsf@gmail.com> <83k1c0kcbw.fsf@gnu.org> <87wog0pwg6.fsf@gmail.com> <83ftmok8tt.fsf@gnu.org> <874l34smwx.fsf@telefonica.net> <83blxck5gf.fsf@gnu.org> <87v9vkr1je.fsf@telefonica.net> <83wofzimq8.fsf@gnu.org> <87eez0kxhq.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="7149"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36828@debbugs.gnu.org, stepnem@gmail.com To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 26 10:53:10 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 1iOHos-0001k8-Kl for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2019 10:53:10 +0200 Original-Received: from localhost ([::1]:39236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOHor-0007xO-BW for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2019 04:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52862) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOHol-0007mO-BQ for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 04:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOHok-0003dr-6n for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 04:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOHok-0003dm-3o for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 04:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOHoj-00058Z-Vv for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 04:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2019 08:53: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.157207993019674 (code B ref 36828); Sat, 26 Oct 2019 08:53:01 +0000 Original-Received: (at 36828) by debbugs.gnu.org; 26 Oct 2019 08:52:10 +0000 Original-Received: from localhost ([127.0.0.1]:39680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOHnu-00057F-6J for submit@debbugs.gnu.org; Sat, 26 Oct 2019 04:52:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOHns-000570-P2 for 36828@debbugs.gnu.org; Sat, 26 Oct 2019 04:52:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOHnn-0003Nm-4u; Sat, 26 Oct 2019 04:52:03 -0400 Original-Received: from [176.228.60.248] (port=2407 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iOHnm-0003N1-Ce; Sat, 26 Oct 2019 04:52:02 -0400 In-reply-to: <87eez0kxhq.fsf@telefonica.net> (message from =?UTF-8?Q?=C3=93scar?= Fuentes on Sat, 26 Oct 2019 05:16:01 +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:170181 Archived-At: > From: Óscar Fuentes > Cc: stepnem@gmail.com, 36828@debbugs.gnu.org > Date: Sat, 26 Oct 2019 05:16:01 +0200 > > Sorry for the long delay. I no longer remember the details from what I discovered back there, so expect some repeated questions, mistakes, and confusion. Apologies in advance. > >> >> M-x describe-function shows the docstrings of the Emacs I'm executing, > >> > > >> > How do you know? What is the value of doc-directory? > >> > >> /home/oscar/dev/emacs/stable/build/etc/ > >> > >> The installed version is in /usr/local. > > > > Hmm... then this is not the use case I had in mind, and some other > > factor is at work here. Your use case is supposed to be handled by > > this fragment from init_callproc: > > What follows is the result of a debug session for the chunk of code you > indicated. > > if (data_dir == 0) > { > Lisp_Object tem, srcdir; > Lisp_Object lispdir = Fcar (decode_env_path (0, PATH_DUMPLOADSEARCH, 0)); > > srcdir = Fexpand_file_name (build_string ("../src/"), lispdir); > > tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory); > > Vdata_directory is "/usr/local/share/emacs/27.0.50/etc/" > > tem is "/usr/local/share/emacs/27.0.50/etc/NEWS" > > srcdir is "/home/oscar/dev/emacs/emacs/src/" I note that the directories you show now are different from what you reported back then: more place for confusion. > Execution never enters this block, because srcdir != > Vinvocation_directory (because this is an out-of-source build) and > "/usr/local/share/emacs/27.0.50/etc/NEWS" exists (because emacs was > installed on the past). > > Lisp_Object newdir; > newdir = Fexpand_file_name (build_string ("../etc/"), lispdir); > tem = Fexpand_file_name (build_string ("NEWS"), newdir); > if (!NILP (Ffile_exists_p (tem))) > Vdata_directory = newdir; > } > } > > The code basically ignores the local, non-installed NEWS when there is > an installed NEWS and we are executing from an out-of-source build tree. > > I propose the reverse: unconditionally test for the non-installed NEWS and > adjust Vdata_directory if it exists. Something like this (untested for > the installed emacs case): I'm not sure I understand the relevance of data-directory to the issue at hand. AFAIR you were talking about the Info documentation, but that is looked up in configure-info-directory; see Info-default-directory-list. We only use data-directory for that in the NS builds, which I believe is not your case. If this all is due to the fact I pointed to this code, then either I was mistaken (sorry!), or there's something I discovered back then, but forgot in the meantime. So I guess we need to back up a notch and see how all this is related to Info manuals? Or what else am I missing?