(bugfix): Fix Helm integration for completing-read (#306)
Fixes #304, using PR #305 as the base, thanks @khinsen
This commit is contained in:
parent
f544bd9ca1
commit
08667d9c7d
1 changed files with 10 additions and 9 deletions
19
org-roam.el
19
org-roam.el
|
@ -651,7 +651,7 @@ https://github.com/abo-abo/swiper")))
|
|||
(user-error "Please install helm from \
|
||||
https://github.com/emacs-helm/helm"))
|
||||
(let ((source (helm-build-sync-source prompt
|
||||
:candidates choices
|
||||
:candidates (mapcar #'car choices)
|
||||
:filtered-candidate-transformer
|
||||
(and (not require-match)
|
||||
#'org-roam---helm-candidate-transformer)
|
||||
|
@ -659,14 +659,15 @@ https://github.com/emacs-helm/helm"))
|
|||
(buf (concat "*org-roam "
|
||||
(s-downcase (s-chop-suffix ":" (s-trim prompt)))
|
||||
"*")))
|
||||
(helm :sources source
|
||||
:action (if action
|
||||
(prog1 action
|
||||
(setq action nil))
|
||||
#'identity)
|
||||
:prompt prompt
|
||||
:input initial-input
|
||||
:buffer buf)))))
|
||||
(or (helm :sources source
|
||||
:action (if action
|
||||
(prog1 action
|
||||
(setq action nil))
|
||||
#'identity)
|
||||
:prompt prompt
|
||||
:input initial-input
|
||||
:buffer buf)
|
||||
(keyboard-quit))))))
|
||||
(if action
|
||||
(funcall action res)
|
||||
res)))
|
||||
|
|
Loading…
Reference in a new issue