Sorting Groups according to the list #1
Replies: 3 comments 1 reply
-
wondering if there is a solution |
Beta Was this translation helpful? Give feedback.
-
Continuing the discussion from #42
This is what I suspected. To experiment with this I added a timer before a Here's the code to replicate: (cl-defun consult-omni--test-results(input &rest args &key callback &allow-other-keys)
(defvar consult-omni--test-timer nil)
(when consult-omni--test-timer
(cancel-timer consult-omni--test-timer))
(let ((entries `(,(propertize "test 1" :source "Test")
,(propertize "test 2" :source "Test"))))
(setq consult-omni--test-timer (run-with-timer 2 nil callback entries))
nil))
(consult-omni-define-source "Testing"
:type 'dynamic
:require-match t
:face 'default
:request #'consult-omni--test-results
:on-return #'ignore
:on-preview #'ignore
:on-callback #'ignore
:enabled (lambda () t)
:group #'consult-omni--group-function)
(let ((consult-omni-multi-sources '("Apps" "Testing")))
(consult-omni-multi)) Making it return first, by removing the timer and pairing it with a slower source, such as |
Beta Was this translation helpful? Give feedback.
-
@Gleek That's a bit confusing. I need to find some time to dig into it, but when I tested it, I turned grouping off by "-- :g nil" and I could see that everything was ordered by the order they arrived. Personally, I tend to use =vertico-next-group= in multi-source searches to quickly find the source I am interested in, rather than relying on the order of sources. |
Beta Was this translation helpful? Give feedback.
-
This is continuing discussion from consult-web's async branch on how to get better sorting of different groups.
here is a link to discussion from consult-web: armindarvish/consult-web#29
Beta Was this translation helpful? Give feedback.
All reactions