Skip to content

Commit

Permalink
Fix: (org-ql-completing-read-snippet) while-no-input
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Sep 27, 2023
1 parent ac3e0d7 commit 3d8efb7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions org-ql-completing-read.el
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,17 @@ Returns value returned by function
`org-ql-completing-read-snippet-function' or
`org-ql-completing-read--snippet-simple', whichever returns a
value, or nil."
(while-no-input
;; Using `while-no-input' here doesn't make it as
;; responsive as, e.g. Helm while typing, but it seems to
;; help a little when using the org-rifle-style snippets.
(org-with-point-at marker
(or (funcall org-ql-completing-read-snippet-function)
(org-ql-completing-read--snippet-simple)))))
(pcase (while-no-input
;; Using `while-no-input' here doesn't make it as
;; responsive as, e.g. Helm while typing, but it seems to
;; help a little when using the org-rifle-style snippets.
(org-with-point-at marker
(or (funcall org-ql-completing-read-snippet-function)
(org-ql-completing-read--snippet-simple))))
(t
;; Interrupted: return nil (which can be concatted).
nil)
(else else)))

(defun org-ql-completing-read-path (marker)
"Return formatted outline path for entry at MARKER."
Expand Down

0 comments on commit 3d8efb7

Please sign in to comment.