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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 19 Apr 2022 21:55:34 +0300

> From: Howard Melman <[email-masked]>
> Date: Tue, 19 Apr 2022 14:43:06 -0400
> Cc: Alan Third <[email-masked]>,
>  Juri Linkov <[email-masked]>,
>  Lars Ingebrigtsen <[email-masked]>,
>  [email-masked]
> 
> On Apr 19, 2022, at 12:55 PM, Eli Zaretskii <[email-masked]> wrote:
> > 
> >> I have installed various emacs packages via package-install.  
> 
> >>   INFO-DIR-SECTION Emacs misc features
> >>   START-INFO-DIR-ENTRY
> >>   * Embark: (embark).     Emacs Mini-Buffer Actions Rooted in Keymaps.
> >>   END-INFO-DIR-ENTRY
> > 
> > I will ask again: are those manuals installed using the install-info
> > command?  That is the command responsible for adding manuals to the
> > DIR menus while paying attention to their sections.
> 
> I thought I answered by saying I used package-install.  I don't know what
> it does (it doesn't seem to call install-info) but the above snippet is from
> ~/.emacs.d/elpa/embark-20220418.2042/embark.info
> 
> and that directory is prepended onto Info-directory-list and contains
> a dir file that says:
> 
> Emacs misc features
> * Embark: (embark).             Emacs Mini-Buffer Actions Rooted in Keymaps.
> 
> My Info-directory-list looks like this, with another dozen elpa dirs before
> the Emacs.app one (which is the "self-contained i.e. relocatable NS build").
> 
> ("/Users/hmelman/.emacs.d/elpa/embark-20220418.2042"
> "/Applications/GnuEmacs.app/Contents/Resources/info/"
> "/usr/local/share/info/"
> "/usr/share/info/")
> 
> I guess info-insert-dir is supposed to collect these and it seems there's an
> issue with it using the sections?  I still don't know if that's mac-specific
> or not.

If this is how package installation works, then it's either a bug in
package installation, or a missing feature in info.el.  info.el
doesn't pay any attention to the sections, it just concatenates all
the DIR files into a single DIR node.  The assumption is that Info
files are installed using install-info, and that all the manuals that
belong to some section are already arranged under that section in a
single DIR file.

If we want to support individual DIR files for each package, which
would mean having the same section mentioned on multiple DIR files, I
guess Info-insert-dir should be taught to rearrange the menu items
such as that all the items from the same section wound up together.
(This might make Info startup slower, though.)

> I had asked if it's a bug that I don't see sections like "Emacs misc features"
> and you didn't answer.  I guess it is?  Do you (or anyone) see them on a 
> non-mac system?

Someone else who installs packages via package.el will have to answer
that, because I always install any packages manually by running
install-info, and thus have all of their menu items neatly arranged in
a single system-wide DIR file.  Thus, I never have these problems.

I've CC'ed Stefan who might know more about this.