Subject: bug#10771: TAB completion for info-display-manual

From: Eli Zaretskii <[email-masked]>
Date: Sun, 02 Dec 2012 19:25:05 +0200

> From: Chong Yidong <[email-masked]>
> Cc: Juri Linkov <[email-masked]>,  [email-masked],  [email-masked]
> Date: Sun, 02 Dec 2012 14:44:45 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Thanks, but this is wrong: it should offer completion only on Info
> > buffers that already exist in the current session.  Completion on
> > manuals installed on the system is perhaps for "C-u C-h i" or some
> > variation of it.
> >
> > The purpose of this command is to assist with switching between
> > manuals that are already loaded, not in adding others.
> 
> I disagree; completion should be provided for any value that the command
> accepts as an argument, so Juri's patch does the right thing.

No, it doesn't.  The command looks up its argument among Info
_buffers_ first, and only if not found, falls back to searching the
manuals installed on the system.  So at the very least, the completion
should include in the collection the manuals loaded into Info buffers
in the current session.  Because manuals loaded into my Info buffers
do not necessarily reflect Info files on my disk.

> If one wishes to get fancy, I suppose one could define a completion
> category override to cause completion to favor manuals in existing Info
> buffers.

There's no need to favor existing buffers, but there is a need to
include them in the completion.