bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64656: 29.0.91; Doc of minibuffer histories and completing-read - au


From: Juri Linkov
Subject: bug#64656: 29.0.91; Doc of minibuffer histories and completing-read - automatic addition of completions to DEFAULT list
Date: Thu, 09 Nov 2023 18:34:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> Customizing 'completions-sort' to the option 'nil' ("No sorting")
> reveals more interesting things.  For example, when vc completes a backend,
> it turns out that the order is manually crafted:
>
>   (defcustom vc-handled-backends '(RCS CVS SVN SCCS SRC Bzr Git Hg)
>     ;; RCS, CVS, SVN, SCCS, and SRC come first because they are per-dir
>     ;; rather than per-tree.  RCS comes first because of the multibackend
>     ;; support intended to use RCS for local commits (with a remote CVS 
> server).

I guess not many users customize 'completions-sort' to nil.
Otherwise someone may notice that the order of unsorted files
is reversed from the output of `ls -U`.  This could be fixed by:

diff --git a/src/dired.c b/src/dired.c
index c10531cdb16..0f527a801f7 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -846,7 +846,7 @@ DEFUN ("file-name-all-completions", 
Ffile_name_all_completions,
   bestmatch = unbind_to (count, bestmatch);
 
   if (all_flag || NILP (bestmatch))
-    return bestmatch;
+    return Fnreverse (bestmatch);
   /* Return t if the supplied string is an exact match (counting case);
      it does not require any change to be made.  */
   if (matchcount == 1 && !NILP (Fequal (bestmatch, file)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]