diff --git a/README.org b/README.org index 05b4bfc..10d6e07 100644 --- a/README.org +++ b/README.org @@ -95,15 +95,15 @@ Lisp code examples are in [[examples.org]]. :END: + *Jumping to an entry:* - - [[#org-ql-find][org-ql-find]] (command) - - [[#helm-org-ql][helm-org-ql]] (command) + - [[#org-ql-find][org-ql-find]] and related commands + - [[#helm-org-ql][helm-org-ql]] + *Showing an agenda-like view:* - - [[#org-ql-search][org-ql-search]] (command) - - [[#org-ql-view][org-ql-view]] (command) - - [[#org-ql-view-sidebar][org-ql-view-sidebar]] (command) - - [[#org-ql-view-recent-items][org-ql-view-recent-items]] (command) + - [[#org-ql-search][org-ql-search]] + - [[#org-ql-view][org-ql-view]] + - [[#org-ql-view-sidebar][org-ql-view-sidebar]] + - [[#org-ql-view-recent-items][org-ql-view-recent-items]] + *Showing a tree in a buffer:* - - [[#org-ql-sparse-tree][org-ql-sparse-tree]] (command) + - [[#org-ql-sparse-tree][org-ql-sparse-tree]] *** org-ql-find @@ -111,7 +111,9 @@ Lisp code examples are in [[examples.org]]. These commands jump to a heading selected using Emacs's built-in completion facilities with an Org QL query: -- ~org-ql-find~ searches all entry content. +- ~org-ql-find~ searches in the current buffer. +- ~org-ql-find-in-agenda~ searches in ~(org-agenda-files)~. +- ~org-ql-find-in-org-directory~ searches in ~org-directory~. [[images/org-ql-find.png]] diff --git a/org-ql-find.el b/org-ql-find.el index 6a4e7c1..5c3acee 100644 --- a/org-ql-find.el +++ b/org-ql-find.el @@ -30,6 +30,7 @@ (require 'org) (require 'org-ql) +(require 'org-ql-search) ;;;; Customization @@ -207,8 +208,16 @@ single predicate)." (run-hook-with-args 'org-ql-find-goto-hook)))))) ;;;###autoload +(defun org-ql-find-in-agenda () + "Call `org-ql-find' on `org-agenda-files'." + (interactive) + (org-ql-find (org-agenda-files))) ;;;###autoload +(defun org-ql-find-in-org-directory () + "Call `org-ql-find' on files in `org-directory'." + (interactive) + (org-ql-find (org-ql-search-directories-files))) (defun org-ql-find--snippet-simple (&optional _regexp) "Return a snippet of the current entry. diff --git a/org-ql.info b/org-ql.info index 3a4c3c0..cfb9896 100644 --- a/org-ql.info +++ b/org-ql.info @@ -194,16 +194,10 @@ File: README.info, Node: Commands, Next: Queries, Up: Usage ============ • *Jumping to an entry:* - • (command) - • (command) - • *Showing an agenda-like view:* - • (command) - • (command) - • (command) - • (command) - • *Showing a tree in a buffer:* - • (command) - + • and related commands + • • *Showing an agenda-like view:* + • • • • • *Showing a tree in a buffer:* + • * Menu: * org-ql-find:: @@ -225,11 +219,9 @@ _Note: These commands use ._ These commands jump to a heading selected using Emacs’s built-in completion facilities with an Org QL query: - • ‘org-ql-find’ searches all entry content. - • ‘org-ql-find-path’ searches only headings (using the - ‘outline-path:’ predicate). - • ‘org-ql-find-heading’ searches only headings (using the ‘heading:’ - predicate). + • ‘org-ql-find’ searches in the current buffer. + • ‘org-ql-find-in-agenda’ searches in ‘(org-agenda-files)’. + • ‘org-ql-find-in-org-directory’ searches in ‘org-directory’.  File: README.info, Node: org-ql-search, Next: helm-org-ql, Prev: org-ql-find, Up: Commands @@ -1654,61 +1646,61 @@ Node: Quelpa2519 Node: Helm support3047 Node: Usage3450 Node: Commands3848 -Node: org-ql-find4353 -Node: org-ql-search4867 -Node: helm-org-ql6561 -Node: org-ql-view6939 -Node: org-ql-view-sidebar7469 -Node: org-ql-view-recent-items7849 -Node: org-ql-sparse-tree8345 -Node: Queries9145 -Node: Non-sexp query syntax10262 -Node: General predicates12021 -Node: Ancestor/descendant predicates18763 -Node: Date/time predicates19891 -Node: Functions / Macros23015 -Node: Agenda-like views23313 -Ref: Function ‘org-ql-block’23475 -Node: Listing / acting-on results24736 -Ref: Caching24944 -Ref: Function ‘org-ql-select’25857 -Ref: Function ‘org-ql-query’28283 -Ref: Macro ‘org-ql’ (deprecated)30057 -Node: Custom predicates30372 -Ref: Macro ‘org-ql-defpred’30596 -Node: Dynamic block34037 -Node: Links36761 -Node: Tips37448 -Node: Changelog37772 -Node: 07-pre38540 -Node: 06239947 -Node: 06140255 -Node: 0640823 -Node: 05243877 -Node: 05144177 -Node: 0544600 -Node: 04946129 -Node: 04846409 -Node: 04746756 -Node: 04647165 -Node: 04547573 -Node: 04447934 -Node: 04348293 -Node: 04248496 -Node: 04148657 -Node: 0448904 -Node: 03253005 -Node: 03153408 -Node: 0353605 -Node: 02356905 -Node: 02257139 -Node: 02157419 -Node: 0257624 -Node: 0161702 -Node: Notes61803 -Node: Comparison with Org Agenda searches61965 -Node: org-sidebar62854 -Node: License63133 +Node: org-ql-find4274 +Node: org-ql-search4740 +Node: helm-org-ql6434 +Node: org-ql-view6812 +Node: org-ql-view-sidebar7342 +Node: org-ql-view-recent-items7722 +Node: org-ql-sparse-tree8218 +Node: Queries9018 +Node: Non-sexp query syntax10135 +Node: General predicates11894 +Node: Ancestor/descendant predicates18636 +Node: Date/time predicates19764 +Node: Functions / Macros22888 +Node: Agenda-like views23186 +Ref: Function ‘org-ql-block’23348 +Node: Listing / acting-on results24609 +Ref: Caching24817 +Ref: Function ‘org-ql-select’25730 +Ref: Function ‘org-ql-query’28156 +Ref: Macro ‘org-ql’ (deprecated)29930 +Node: Custom predicates30245 +Ref: Macro ‘org-ql-defpred’30469 +Node: Dynamic block33910 +Node: Links36634 +Node: Tips37321 +Node: Changelog37645 +Node: 07-pre38413 +Node: 06239820 +Node: 06140128 +Node: 0640696 +Node: 05243750 +Node: 05144050 +Node: 0544473 +Node: 04946002 +Node: 04846282 +Node: 04746629 +Node: 04647038 +Node: 04547446 +Node: 04447807 +Node: 04348166 +Node: 04248369 +Node: 04148530 +Node: 0448777 +Node: 03252878 +Node: 03153281 +Node: 0353478 +Node: 02356778 +Node: 02257012 +Node: 02157292 +Node: 0257497 +Node: 0161575 +Node: Notes61676 +Node: Comparison with Org Agenda searches61838 +Node: org-sidebar62727 +Node: License63006  End Tag Table