Add: helm-org-ql-views, helm-source-org-ql-views

This commit is contained in:
Adam Porter 2019-10-08 16:45:19 -05:00
parent 13723f8163
commit da9be83326
3 changed files with 28 additions and 10 deletions

View file

@ -378,6 +378,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
+ Command ~org-ql-search~ can search files in ~org-directory~; customization options are available in the ~org-ql-search~ group.
+ Command ~org-ql-view-refresh~ can be called with a prefix argument to adjust search parameters.
+ Function ~helm-org-ql-source~, which returns a Helm source that searches given buffers/files with ~helm-org-ql~. It can be used for custom Helm commands that search certain files.
+ Command ~helm-org-ql-views~, which shows one of ~org-ql-views~ selected with Helm.
*Internal*
+ Added generic node data cache to speed up recursive, tree-based queries.

View file

@ -66,6 +66,15 @@
"Keymap for `helm-org-ql' sessions.
Based on `helm-map'.")
(defvar helm-source-org-ql-views
(helm-build-sync-source "Org QL Views"
:candidates (lambda ()
(->> org-ql-views
(-map #'car)
(-sort #'string<)))
:action (list (cons "Show view" #'org-ql-view)))
"Helm source for `org-ql-views'.")
(defvar-local helm-org-ql-buffers-files nil
"Used for `helm-org-ql-save'.")
@ -166,6 +175,12 @@ Is transformed into this query:
(query (org-ql--plain-query helm-pattern)))
(helm-run-after-exit #'org-ql-search buffers-files query)))
;;;###autoload
(defun helm-org-ql-views ()
"Show an `org-ql' view selected with Helm."
(interactive)
(helm :sources helm-source-org-ql-views))
;;;; Functions
(cl-defun helm-org-ql-source (buffers-files &key (name "helm-org-ql"))

View file

@ -698,6 +698,8 @@ File: README.info, Node: 04-pre, Next: 03, Up: Changelog
• Function helm-org-ql-source, which returns a Helm source that
searches given buffers/files with helm-org-ql. It can be used
for custom Helm commands that search certain files.
• Command helm-org-ql-views, which shows one of org-ql-views
selected with Helm.
*Internal*
• Added generic node data cache to speed up recursive, tree-based
@ -967,16 +969,16 @@ Node: Agenda-like views17742
Node: Listing / acting-on results19147
Node: Changelog23749
Node: 04-pre24256
Node: 0325029
Node: 02328005
Node: 02228231
Node: 02128497
Node: 0228694
Node: 0132727
Node: Notes32826
Node: Comparison with Org Agenda searches32988
Node: org-sidebar33859
Node: License34138
Node: 0325132
Node: 02328108
Node: 02228334
Node: 02128600
Node: 0228797
Node: 0132830
Node: Notes32929
Node: Comparison with Org Agenda searches33091
Node: org-sidebar33962
Node: License34241

End Tag Table