Fix: (org-ql-find) Always include query-prefix
Thanks to Thomas Bergheim (@bergheim) for his help!
This commit is contained in:
parent
c2b8af3181
commit
d46e69b0fc
1 changed files with 3 additions and 1 deletions
|
|
@ -160,6 +160,8 @@ single predicate)."
|
||||||
(all (string table pred _point)
|
(all (string table pred _point)
|
||||||
(all-completions string table pred))
|
(all-completions string table pred))
|
||||||
(collection (str _pred flag)
|
(collection (str _pred flag)
|
||||||
|
(when query-prefix
|
||||||
|
(setf str (concat query-prefix str)))
|
||||||
(pcase flag
|
(pcase flag
|
||||||
('metadata (list 'metadata
|
('metadata (list 'metadata
|
||||||
(cons 'group-function #'group)
|
(cons 'group-function #'group)
|
||||||
|
|
@ -184,7 +186,7 @@ single predicate)."
|
||||||
(rx-to-string `(seq (optional (repeat 1 3 (repeat 1 15 (not space)) (0+ space)))
|
(rx-to-string `(seq (optional (repeat 1 3 (repeat 1 15 (not space)) (0+ space)))
|
||||||
bow (or ,@query-tokens) (0+ (not space))
|
bow (or ,@query-tokens) (0+ (not space))
|
||||||
(optional (repeat 1 3 (0+ space) (repeat 1 15 (not space))))))))))
|
(optional (repeat 1 3 (0+ space) (repeat 1 15 (not space))))))))))
|
||||||
(org-ql-select buffers-files (org-ql--query-string-to-sexp (concat query-prefix str))
|
(org-ql-select buffers-files (org-ql--query-string-to-sexp str)
|
||||||
:action #'action))))))
|
:action #'action))))))
|
||||||
;; NOTE: It seems that the `completing-read' machinery can call,
|
;; NOTE: It seems that the `completing-read' machinery can call,
|
||||||
;; abort, and re-call the collection function while the user is
|
;; abort, and re-call the collection function while the user is
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue