From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#54175: 27.2; Info-follow-reference completions in reverse order Date: Sat, 26 Feb 2022 19:17:21 -0500 Message-ID: <7A89A71F-708C-4217-989C-2E9990759E13@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33712"; mail-complaints-to="usenet@ciao.gmane.io" To: 54175@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 27 01:18:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nO7GM-0008Ym-Nc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Feb 2022 01:18:10 +0100 Original-Received: from localhost ([::1]:45214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO7GL-0005V4-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Feb 2022 19:18:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO7GE-0005S7-AA for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 19:18:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO7GE-0005Tv-18 for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 19:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO7GD-0000EM-Pc for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 19:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2022 00:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54175 X-GNU-PR-Package: emacs X-Debbugs-Original-To: GNU Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.1645921048831 (code B ref -1); Sun, 27 Feb 2022 00:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Feb 2022 00:17:28 +0000 Original-Received: from localhost ([127.0.0.1]:56459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO7Fg-0000DK-F9 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 19:17:28 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:34752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO7Fe-0000DC-95 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 19:17:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO7Fe-0004rC-3p for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 19:17:26 -0500 Original-Received: from [2607:f8b0:4864:20::82f] (port=39853 helo=mail-qt1-x82f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO7Fc-0005Qi-FF for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 19:17:25 -0500 Original-Received: by mail-qt1-x82f.google.com with SMTP id b23so5959482qtt.6 for ; Sat, 26 Feb 2022 16:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=aKPl/CGcBMutezD3Svl0y7jWWDAWxk5EWgK57trzOKM=; b=Pl6iozaxuEKV5qCYKAEIjlqfVWwEtViV27GVghY7wrkBx1kJUfQL4nkHNvZjHXyyzn XpLCR2HqF1XM0okKlIrp6CuX0bXP0X4Syscyie1VZjR+hs97iRbe8d9+QOt+fRXNnm4t ntQ5AuN6E8Y23kQXO9/xjF61z0GQJO2+YrdJq4ABMsjJxa3dKIAzeG2pi9pVmTzGAsmd kn06Mbcb6XDFpvQxarXrJBzAHiN1kJdIGtf+m/75xAbtuSnggMVP/yq3wcvIWrSPGlqR 4oU8d2lVgb+prSbuH64W8OwPPu1HGkugoVFknmH9lLVfsXF+TeDMRXfskOqfDD24YxYs lUkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=aKPl/CGcBMutezD3Svl0y7jWWDAWxk5EWgK57trzOKM=; b=u6oKv5Jp6kZ86BJnTtVwynkeODPGn/ZM+g0LEAP+nlNUfuo7Cyl0urvyo0zHHrtDSE VEWqrrEhdzl+FQMNdHJ2/SzQ5SzYfeK0yx9Vbtt2lq18wbPu7YkF8kq48f10WijgXhTo YE54UW9GIuyVuY3ylPIcQ8tGzHdGAN71J0xEdLRUQkmwvlQU1OnegOrTwgDZ7iVElzEx 4Ydg51WPclBMXWwTZXVv8Q/YPvh/p+686N72mUC04JQkBKaJ7tdw8el6z/cpK7YClPEu t6RyW26i9NFEz1iO0VNrXOw50gR5g6DAreASl7Dibn5esXEzD3U7D1LlvEV31LEmU3tH uWEA== X-Gm-Message-State: AOAM533flzTZg9fcBR7+0iuoyGY2/U40ycD27oM0NtA64cqyp371PBiF 5gFmhol3iVCZcNiTl+yu7IfMgTw4yRc= X-Google-Smtp-Source: ABdhPJyyPK2fSVqhkvisATKIUCna6YqgEWjXsbbwThwpPcIUNXehJz/z7sEBvJgoLF14cPaYc3vU9g== X-Received: by 2002:ac8:7d0e:0:b0:2de:b3fb:7325 with SMTP id g14-20020ac87d0e000000b002deb3fb7325mr8029834qtb.518.1645921042506; Sat, 26 Feb 2022 16:17:22 -0800 (PST) Original-Received: from smtpclient.apple (pool-108-26-204-101.bstnma.fios.verizon.net. [108.26.204.101]) by smtp.gmail.com with ESMTPSA id a3-20020a05620a124300b00648c9a37984sm3011929qkl.58.2022.02.26.16.17.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Feb 2022 16:17:22 -0800 (PST) X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::82f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=hmelman@gmail.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_FMBLA_NEWDOM=1.498, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227692 Archived-At: 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