From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#64656: 29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list Date: Sun, 05 Nov 2023 20:11:36 +0200 Organization: LINKOV.NET Message-ID: <867cmw83zb.fsf@mail.linkov.net> References: <83y1jga0nr.fsf@gnu.org> <83o7kb9a40.fsf@gnu.org> <86bkg84de3.fsf@mail.linkov.net> <86jzrhlrub.fsf_-_@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 64656@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 05 19:14:52 2023 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 1qzhe8-0005os-I6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Nov 2023 19:14:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzhdj-0001PP-Q6; Sun, 05 Nov 2023 13:14:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzhdh-0001Lb-6l for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 13:14:25 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzhdg-0006gx-U0 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 13:14:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzheH-0002dI-PL for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 13:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Nov 2023 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64656 X-GNU-PR-Package: emacs Original-Received: via spool by 64656-submit@debbugs.gnu.org id=B64656.169920806310055 (code B ref 64656); Sun, 05 Nov 2023 18:15:01 +0000 Original-Received: (at 64656) by debbugs.gnu.org; 5 Nov 2023 18:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:38144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzhde-0002c7-RX for submit@debbugs.gnu.org; Sun, 05 Nov 2023 13:14:23 -0500 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:51987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzhdc-0002bs-VR for 64656@debbugs.gnu.org; Sun, 05 Nov 2023 13:14:21 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 50297C0004; Sun, 5 Nov 2023 18:13:35 +0000 (UTC) In-Reply-To: <86jzrhlrub.fsf_-_@mail.linkov.net> (Juri Linkov's message of "Fri, 20 Oct 2023 09:47:12 +0300") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273838 Archived-At: >>> > `C-h v org TAB' >>> > `M-n' >>> > `M-n' I become convinced more and more that the problem lies somewhere else. Trying to customize 'completions-sort' to the valid option 'nil' ("No sorting") reveals there are some completions where a meaningful order is still not maintained. For example, 'C-x v b l TAB' displays branches in the order reverse from the output of `git for-each-ref --format="%(refname)"`. Here is the fix: #+begin_src patch diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 9ec45c59893..7a3eaba78c7 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1723,7 +1729,7 @@ vc-git-revision-table "^refs/\\(heads\\|tags\\|remotes\\)/\\(.*\\)$"))) (while (re-search-forward regexp nil t) (push (match-string 2) table)))) - table)) + (nreverse table))) (defun vc-git-revision-completion-table (files) (letrec ((table (lazy-completion-table #+end_src