[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr 9d17bc196a 4/5: tmr--description-prompt: Don't sort
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr 9d17bc196a 4/5: tmr--description-prompt: Don't sort candidates |
Date: |
Tue, 17 May 2022 04:57:58 -0400 (EDT) |
branch: externals/tmr
commit 9d17bc196a0c891faa33af64277f3ec877f89016
Author: Damien Cassou <damien@cassou.me>
Commit: Protesilaos Stavrou <info@protesilaos.com>
tmr--description-prompt: Don't sort candidates
This function shouldn't sort its candidates so the user can learn
their position by heart and can order candidates as s·he pleases.
https://github.com/minad/vertico/issues/228
---
tmr.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tmr.el b/tmr.el
index 85fc08d900..f279441824 100644
--- a/tmr.el
+++ b/tmr.el
@@ -289,7 +289,13 @@ present."
(if default
(format "Description for this tmr [%s]: " default)
"Description for this tmr: ")
- tmr-descriptions-list nil nil nil
+ (lambda (string predicate action)
+ (if (eq action 'metadata)
+ `(metadata (display-sort-function . ,#'identity)
+ (cycle-sort-function . ,#'identity))
+ (complete-with-action
+ action tmr-descriptions-list string predicate)))
+ nil nil nil
'tmr--description-hist default))
(defun tmr--complete (timer)