unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54175: 27.2; Info-follow-reference completions in reverse order
@ 2022-02-27  0:17 Howard Melman
  2022-02-27  7:17 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Howard Melman @ 2022-02-27  0:17 UTC (permalink / raw)
  To: 54175

This is the same issue as in bug#38614 which was about
Info-complete-menu-item, but this is about
Info-follow-reference.  I hope it will also be fixed.

Info-follow-reference calls completing-read with a list of
candidates found in the node.  It scans the node from top to
bottom pushing references onto a completions list.  The list
ends up being in the reverse order of position in the node.
For the default completion mechanism this isn't a problem,
but with a completion package like fido or ivy which
immediately displays the list of candidates, this order
isn't particularly useful.

My use case is browsing an info manual, going to a new node
via n, so my point is near the top of the node.  I see I
want to follow the first reference and type f and I'm
presented with a list of completion candidates. The first
candidate is from the bottom of the node, it's not even
visible on my screen.  If the list was in the order as found
in the mode I could just type RET, but now I have to type to
complete or beforehand position point at the reference so
that it will be used as a default.

I suggest adding something like the following in
Info-follow-reference just after the while loop that builds
completions:

     (setq completions (nreverse completions))

I saw this on the macport of Emacs 27.2 but the code on
master looks to me to be the same.

Howard

In GNU Emacs 27.2 (build 1, x86_64-apple-darwin20.6.0, Carbon Version 164 AppKit 2022.6)
of 2021-11-16 built on Mac-1637103180448.local
System Description:  macOS 11.6.4





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-05 14:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27  0:17 bug#54175: 27.2; Info-follow-reference completions in reverse order Howard Melman
2022-02-27  7:17 ` Eli Zaretskii
2022-02-27 15:43   ` Howard Melman
2022-02-27 16:36     ` Eli Zaretskii
2022-02-27 16:52       ` Howard Melman
2022-02-27 16:49     ` Eli Zaretskii
2022-02-27 16:59       ` Howard Melman
2022-02-27 17:09         ` Eli Zaretskii
2022-02-27 17:18           ` Howard Melman
2022-02-27 17:31             ` Eli Zaretskii
2022-02-27 17:50               ` Howard Melman
2022-05-04 14:46                 ` Howard Melman
2022-05-05 11:30                   ` Lars Ingebrigtsen
2022-05-05 14:00                     ` Howard Melman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).