[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix 241fb64 01/10: Add selectrum completing library s
From: |
Stefan Monnier |
Subject: |
[elpa] externals/kiwix 241fb64 01/10: Add selectrum completing library support |
Date: |
Wed, 17 Mar 2021 18:45:23 -0400 (EDT) |
branch: externals/kiwix
commit 241fb646a8b8ed0eead7851a289e806f3e1bc120
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Add selectrum completing library support
---
kiwix.el | 68 ++++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 40 insertions(+), 28 deletions(-)
diff --git a/kiwix.el b/kiwix.el
index 1008fd5..fb22a8f 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -119,11 +119,13 @@
:type 'string
:safe #'stringp)
-(defcustom kiwix-default-completing-read (cond ((fboundp 'ivy-read) 'ivy)
- ((fboundp 'helm) 'helm)
- (t t))
+(defcustom kiwix-default-completing-read (cond
+ ((fboundp 'selectrum-read)
'selectrum)
+ ((fboundp 'ivy-read) 'ivy)
+ ((fboundp 'helm) 'helm)
+ (t t))
"Kiwix default completion frontend.
-Currently Ivy (`ivy') and Helm (`helm') both supported.
+Currently `selectrum', Ivy (`ivy') and Helm (`helm') all supported.
Set it to ‘t’ will use Emacs built-in ‘completing-read’."
:type 'symbol
:safe #'symbolp)
@@ -293,32 +295,42 @@ list and return a list result."
(setq kiwix--selected-library (kiwix-select-library))
(let* ((library kiwix--selected-library)
(query (pcase kiwix-default-completing-read
- ('helm
- (require 'helm)
- (helm :source (helm-build-async-source
"kiwix-helm-search-hints"
- :candidates-process
- (lambda (input)
- (apply #'kiwix-ajax-search-hints
- input
`(,kiwix--selected-library))))
- :input (kiwix--get-thing-at-point)
- :buffer "*helm kiwix completion candidates*"))
+ ('selectrum
+ (require 'selectrum)
+ (selectrum-read
+ "Kiwix related entries: "
+ (lambda (input)
+ (apply #'kiwix-ajax-search-hints
+ input `(,kiwix--selected-library)))
+ :require-match nil))
('ivy
(require 'ivy)
- (ivy-read "Kiwix related entries: "
- (lambda (input)
- (apply #'kiwix-ajax-search-hints
- input `(,kiwix--selected-library)))
- :predicate nil
- :require-match nil
- :initial-input (kiwix--get-thing-at-point)
- :preselect nil
- :def nil
- :history nil
- :keymap nil
- :update-fn 'auto
- :sort t
- :dynamic-collection t
- :caller 'ivy-done))
+ (ivy-read
+ "Kiwix related entries: "
+ (lambda (input)
+ (apply #'kiwix-ajax-search-hints
+ input `(,kiwix--selected-library)))
+ :predicate nil
+ :require-match nil
+ :initial-input (kiwix--get-thing-at-point)
+ :preselect nil
+ :def nil
+ :history nil
+ :keymap nil
+ :update-fn 'auto
+ :sort t
+ :dynamic-collection t
+ :caller 'ivy-done))
+ ('helm
+ (require 'helm)
+ (helm
+ :source (helm-build-async-source
"kiwix-helm-search-hints"
+ :candidates-process
+ (lambda (input)
+ (apply #'kiwix-ajax-search-hints
+ input
`(,kiwix--selected-library))))
+ :input (kiwix--get-thing-at-point)
+ :buffer "*helm kiwix completion candidates*"))
(_
(completing-read
"Kiwix related entries: "
- [elpa] externals/kiwix updated (6c64f7b -> 0c5e161), Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix 598070e 02/10: Fix customization groups should not end in "-mode", Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix 945de13 03/10: Update URL to Homepage, Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix a4e04c3 05/10: Fix "kiwix-org-get-library" doesn’t start with package’s prefix "org-kiwix", Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix 8c60780 06/10: Fix "org-wikipedia-open-link" doesn’t start with package’s prefix "org-kiwix", Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix e518160 08/10: Bump version to v1.0.3, Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix 0c5e161 10/10: Fix #5 Switch from selectrum-read to consult--read API, Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix 241fb64 01/10: Add selectrum completing library support,
Stefan Monnier <=
- [elpa] externals/kiwix 5d042a3 04/10: Fix "chinese-string-p" doesn’t start with package’s prefix "org-kiwix", Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix c99b695 07/10: You should depend on (emacs "24.3") if you need ‘url-encode-url’, Stefan Monnier, 2021/03/17
- [elpa] externals/kiwix e5821f5 09/10: You should depend on (emacs "26.1") if you need ‘org-link-set-parameters’, Stefan Monnier, 2021/03/17