GNU bug report logs - #64656
29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 15 Jul 2023 23:36:01 UTC

Severity: minor

Found in version 29.0.91

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 64656 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 64656 <at> debbugs.gnu.org
Subject: Re: 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
>>> > `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




This bug report was last modified 1 year and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.