]> git.eshelyaron.com Git - emacs.git/commitdiff
Comment on limitation of flex completion style's sorting function
authorJoão Távora <joaotavora@gmail.com>
Mon, 23 Dec 2019 11:08:43 +0000 (12:08 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 23 Dec 2019 11:08:43 +0000 (12:08 +0100)
* lisp/minibuffer.el (completion--flex-adjust-metadata): Add
comment.

lisp/minibuffer.el

index 6011a493d0b1926b3d90445e0efa5d5333bcd9ea..0e9b1c199a39608f0837c639b849b3be31889df2 100644 (file)
@@ -3593,8 +3593,13 @@ that is non-nil."
                    completions)))
             (cond
              ((or (not (window-minibuffer-p))
-                  (> (point-max)
-                     (minibuffer-prompt-end)))
+                  ;; JT@2019-12-23: FIXME: this is still wrong.  What
+                  ;; we need to test here is "some input that actually
+                  ;; leads to flex filtering", not "something after
+                  ;; the minibuffer prompt".  The latter is always
+                  ;; true for file searches, meaning the next clauses
+                  ;; will be ignored.
+                  (> (point-max) (minibuffer-prompt-end)))
               (sort
                pre-sorted
                (lambda (c1 c2)