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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 29 Jul 2019 19:57:55 +0300

> From: Štěpán Němec <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Mon, 29 Jul 2019 18:08:33 +0200
> 
> On Mon, 29 Jul 2019 18:11:45 +0300
> Eli Zaretskii wrote:
> 
> > I think you are missing the perspective of someone who considers the
> > current behavior to be TRT.
> 
> Certainly. So much that I can't even imagine why anybody would consider
> that TRT (although I do try, and will appreciate if you try to explain).

Once again, we are talking about the situation where there's both an
installed NEWS file and an uninstalled one for the same Emacs
version.  The situation where there's just one of them works exactly
as you want.  Right?

> Whether some version is more up-to-date or useful (whatever that means)
> is besides the point. What I meant by "most relevant for the running
> executable" and "obvious" above was simply what seems to me a case of
> the principle of least surprise: if I run /usr/bin/emacs, I expect it to
> use the same PREFIX for other things, i.e. /usr/share/emacs.... If I run
> /usr/local/bin/emacs, I expect it to use /usr/local/share/emacs.... And
> if I run src/emacs, I expect it to use the source tree.

But that's not how Emacs works.  Emacs looks for its data-directory
where it was configured to look for it.  At configure time, you can
specify that place via the --datadir=DIR option.  The result (or the
default, if you didn't specify --datadir=DIR) is recorded in
src/epaths.h, and that's where Emacs will look for the data files.

IOW, you are describing an Emacs that is very different from how the
real Emacs works, has been working for decades.  Emacs does NOT
determine all of the different directories relative to the directory
where its binary executable lives.  It does it according to how it was
configured.