Subject: bug#36828: 27.0.50; Uninstalled emacs shows installed documentation

From: Óscar Fuentes <[email-masked]>
Date: Mon, 29 Jul 2019 23:09:09 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Óscar Fuentes <[email-masked]>
>> Cc: Štěpán Němec <[email-masked]>,
>>   [email-masked]
>> Date: Mon, 29 Jul 2019 20:42:06 +0200
>> 
>> FWIW, what I was trying to say is that I consider confusing (in the
>> sense of "wrong") that when I type C-h N the resulting document does not
>> correspond to what I just built and executed.
>> 
>> 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.

>> I fail to see a reason why making such change would negatively
>> affect anyone.
>
> You'll need to describe that change in more detail, then we could see
> who or what it will affect.  I don't think we got to those details
> yet.

Are you asking for the description in changes to the source code or to
the procedure? In any case I haven't studied the current procedure so I
don't know what must be changed, I just can describe, for this specific
case, what happens and what IMAO is the correct thing to do, which I've
already done.

A cursory look at view-emacs-news shows that it uses data-directory to
locate the file, and data-directory is

/usr/local/share/emacs/27.0.50/etc/

in my uninstalled build.

A quick look at info.el hints that data-directory is also used for
locating the info file.

The change would amount to determine if we are running from an
uninstalled build and, if positive, set data-directory et al. to the
values they would have if no installed instance existed.