From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#38614: 26.3; Info completions in reverse order Date: Fri, 3 Jan 2020 14:27:03 -0500 Message-ID: References: <83mubt60an.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="163602"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38614@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 03 20:28:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inScE-000gOb-Cr for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 20:28:10 +0100 Original-Received: from localhost ([::1]:55998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inScC-0003rd-GH for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 14:28:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56045) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inSc7-0003rX-Fs for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 14:28:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inSc6-0001xf-Hm for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 14:28:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35490) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inSc6-0001wy-Dy for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 14:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1inSc6-0004QD-9I for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 14:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2020 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38614 X-GNU-PR-Package: emacs Original-Received: via spool by 38614-submit@debbugs.gnu.org id=B38614.157807963216941 (code B ref 38614); Fri, 03 Jan 2020 19:28:02 +0000 Original-Received: (at 38614) by debbugs.gnu.org; 3 Jan 2020 19:27:12 +0000 Original-Received: from localhost ([127.0.0.1]:41463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inSbH-0004PB-R9 for submit@debbugs.gnu.org; Fri, 03 Jan 2020 14:27:12 -0500 Original-Received: from mail-qk1-f174.google.com ([209.85.222.174]:36057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inSbG-0004Oy-3f for 38614@debbugs.gnu.org; Fri, 03 Jan 2020 14:27:10 -0500 Original-Received: by mail-qk1-f174.google.com with SMTP id a203so34962412qkc.3 for <38614@debbugs.gnu.org>; Fri, 03 Jan 2020 11:27:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6BO3SOLX0hG4eMQK7Ynmxx+aS2yAAAQ5Av7x0x0hwJQ=; b=e3y2wlLbzCusB9WpETqNZ13M+xajFwrwwQkNA12v6bZ800NWd4EeOBy3YKINot/pxv Iy8D9AMrgaVRoBb1HcoSFSgBNQ0OErr6QbxOpBHAdmISdqWfhDv5/WPN+6c9jSB9sIuj 1ihZDs1VtJDxyXVAoYlzZFIJLZL8T55r9Y9fh15patvg+lYloQ58idUSvuduk9oQZiso jlUNVBU54122XvG96ywn0V7PjNoYeosjHSLHlLxC7bwoRLeisilhhWdPg+MMiB6COy7S ECsDn+zDrUr0HEaa5nML3iONAHqWoJKhNk9Z/jEBoZqx6NiQAaBCWb9aHPRNySYC1Acb 2x/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6BO3SOLX0hG4eMQK7Ynmxx+aS2yAAAQ5Av7x0x0hwJQ=; b=jVJFG+BZ059M7cHoFQLoZo/QeKtVGnFeKDvtzeYFLWFJ8ZLcG85xAsBnDEgSxcNSSb iJhc+ycevbsA0M38e2t9goTC4fT/yeFLqJKskSZlPKg9ONe/6T9hB7i6zKSIQmK0cNwW YpMGnSZwaXF5FCh4a8+o0aSk7DNcMvaafWfkqqXpyp/x1dE1onG0wjsDXFM+opTfIV8T A7rHlYVedOnxbbmQbmPRlg+wFkI1Q5sQpKO5mal546ELsNM07X44xoSZqlENkgBcLTOK FzqIX6UbG5sD9voEydCosarmOJZ5iVfMQvMtBE7Z3uhCvX9Iq71Py1gJH1bIz70auwPF sxJw== X-Gm-Message-State: APjAAAXAvB3LdSw7F5iPy5sQwDZcAeZUSdnjpQY0Ua8pbtyMn1tifQES jSJN9iq7qfa7NcFJcl+DCIP/4r2T X-Google-Smtp-Source: APXvYqx8Tl1so+R3JrJi5ZDlEs+CuuAM6kUKK38zrFLFq7Y932Ujj8kQMajp6TOV+cCn59Rtt35i8g== X-Received: by 2002:a37:98c6:: with SMTP id a189mr72744953qke.500.1578079624515; Fri, 03 Jan 2020 11:27:04 -0800 (PST) Original-Received: from lumet.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id x16sm16888187qki.110.2020.01.03.11.27.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jan 2020 11:27:04 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174131 Archived-At: I wrote on Sat, 14 Dec 2019: > When using ivy mode, Info-index shows me the list of > completions in reverse alphabetical order. Info-menu does too. > Both Info-index and Info-menu use completing-read with > Info-complete-menu-item as the collections argument. It > seems to generate the list in reverse order. >=20 > Sorry this isn't a formatted patch, but a one line fix solves it for = me. >=20 > If after this line in Info-complete-menu-item: > (setq completions (delete-dups completions)) > I add this line: > (setq completions (nreverse completions)) > the index and menus are shown in alphabetical order. My original fix was in the wrong place. It only worked for info files = that had a single index node (e.g., elisp.info). To work more generally = with files with several index nodes (e.g., emacs.info) the new line = should be just before the cache is updated: (setq completions (nreverse completions)) ; added fix ;; Update the cache. (setq Info-complete-cache (list Info-current-file Info-current-node Info-complete-next-re string completions Info-complete-nodes))) =09 I still hope this is considered. The cost of the nreverse here is small, = and if completion mechanisms sort the list later, they'll find an = already sorted list will sort faster than the degenerate case of sorting = a list already in reverse order. Howard=