From d46e69b0fc71566f848faf9eee5fad88bfc6fda5 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 14 Jul 2022 12:52:44 -0500 Subject: [PATCH] Fix: (org-ql-find) Always include query-prefix Thanks to Thomas Bergheim (@bergheim) for his help! --- org-ql-find.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-ql-find.el b/org-ql-find.el index 080bb12..69994f2 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -160,6 +160,8 @@ single predicate)." (all (string table pred _point) (all-completions string table pred)) (collection (str _pred flag) + (when query-prefix + (setf str (concat query-prefix str))) (pcase flag ('metadata (list 'metadata (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))) bow (or ,@query-tokens) (0+ (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)))))) ;; NOTE: It seems that the `completing-read' machinery can call, ;; abort, and re-call the collection function while the user is