Subject: Re: bug#54961: 28.1; info-display-manual completions issues

From: Howard Melman <[email-masked]>
Date: Wed, 20 Apr 2022 15:10:48 -0400

On Apr 20, 2022, at 1:01 PM, Alan Third <[email-masked]> wrote:
> 
> My uneducated guess is that it's possible to have a "UNIX" style
> install already on a machine, which might be in /usr and then want to
> run the self-contained version and not pick up the files in /usr
> before the self-contained version's files.
> 
> I've no idea if that's plausible.

Yes this sounds plausible.  MacOS comes with a /usr/share/info/ with
some manuals for the very old versions of somethings it ships with.
homebrew, a popular package manager for mac installs manuals in
/usr/local/share/info/.  

As you said, apps on a mac are installed in a special directory type,
ending in .app and that the window manager knows how to use. Double
clicking on Emacs.app runs the program inside it and it can be dragged
to the trash to delete.  In the Emacs.app is an info/ directory with the
manuals emacs ships with.  

It definitely makes sense that I'd want these three directories ordered as:

("/Applications/GnuEmacs.app/Contents/Resources/info/"
 "/usr/local/share/info/"
 "/usr/share/info/")

IIRC on other systems when building emacs it would install the emacs manuals
in a standard place.  In the NS build it would put it in the .app and of 
course something would need to tell the emacs info reader where that place is.  It 
sounds like older code modified INFOPATH via another NS trick and that
confused users and instead this code just modifies Info-directory-list
directly, which makes more sense.  I'm not sure a standalone info
reader would find it but if that was wanted a user could set INFOPATH
themselves to include the Emacs.app path.

I'm not sure how this interacts with package info files installed in
 ~/.emacs.d/elpa/.  You'd want those directories ahead of the Emacs.app
one and that is what I see happening.  So I think all this is fine.

I think my problem with headings disappearing is entirely the effect
of Info-streamline-headings and it's default value that merges all
headings with Emacs in them to one Emacs heading.  That isn't what
I want, I'm not sure if that's what's wanted by default since the dir
that ships with Emacs has more useful and specific headings, though I think
they could be improved.  I haven't looked if this streamlining preserves
ordering, but the order of manuals listed in the constructed dir need
not be the same as the order of Info-directory-list where they will
be searched for.  The first is just presentation and is what I was commenting
about.

Howard