emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] scratch/new-flex-completion-style 2c75775 2/2: Score,


From: Dmitry Gutov
Subject: Re: [Emacs-diffs] scratch/new-flex-completion-style 2c75775 2/2: Score, sort and annotate flex-style completions according to match tightness
Date: Wed, 6 Feb 2019 06:11:25 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

On 03.02.2019 02:28, Jo�o T�vora wrote:
+          ;; Sort again in case the completion style has propertized
+          ;; completions with a 'completion-style-sort-order.
+          (setq completions
+                (sort completions
+                      (lambda (a b)
+                        (let ((va (get-text-property 0 
'completion-style-sort-order a))
+                              (vb (get-text-property 0 
'completion-style-sort-order b)))

Shouldn't we be concerned that this overrides display-sort-function returned by the completion table?

Maybe some sort of customizable mechanism is in order, similar to completion-styles.

Or more simply, we just leave it to the completion table's author to set display-sort-function to a special value that makes use of these properties. It's not like setting it to a different value is going to make sense in this case.

+          ;; Annotate completions with <...>
+          ;; the completion style annotation.

Is this for debugging?



reply via email to

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