Add: (org-ql-find-in-agenda, org-ql-find-in-org-directory)

This commit is contained in:
Adam Porter 2022-06-25 10:58:17 -05:00
parent dc02c59cad
commit 5f058b9eee
3 changed files with 81 additions and 78 deletions

View file

@ -95,15 +95,15 @@ Lisp code examples are in [[examples.org]].
:END: :END:
+ *Jumping to an entry:* + *Jumping to an entry:*
- [[#org-ql-find][org-ql-find]] (command) - [[#org-ql-find][org-ql-find]] and related commands
- [[#helm-org-ql][helm-org-ql]] (command) - [[#helm-org-ql][helm-org-ql]]
+ *Showing an agenda-like view:* + *Showing an agenda-like view:*
- [[#org-ql-search][org-ql-search]] (command) - [[#org-ql-search][org-ql-search]]
- [[#org-ql-view][org-ql-view]] (command) - [[#org-ql-view][org-ql-view]]
- [[#org-ql-view-sidebar][org-ql-view-sidebar]] (command) - [[#org-ql-view-sidebar][org-ql-view-sidebar]]
- [[#org-ql-view-recent-items][org-ql-view-recent-items]] (command) - [[#org-ql-view-recent-items][org-ql-view-recent-items]]
+ *Showing a tree in a buffer:* + *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 *** 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: 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]] [[images/org-ql-find.png]]

View file

@ -30,6 +30,7 @@
(require 'org) (require 'org)
(require 'org-ql) (require 'org-ql)
(require 'org-ql-search)
;;;; Customization ;;;; Customization
@ -207,8 +208,16 @@ single predicate)."
(run-hook-with-args 'org-ql-find-goto-hook)))))) (run-hook-with-args 'org-ql-find-goto-hook))))))
;;;###autoload ;;;###autoload
(defun org-ql-find-in-agenda ()
"Call `org-ql-find' on `org-agenda-files'."
(interactive)
(org-ql-find (org-agenda-files)))
;;;###autoload ;;;###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) (defun org-ql-find--snippet-simple (&optional _regexp)
"Return a snippet of the current entry. "Return a snippet of the current entry.

View file

@ -194,16 +194,10 @@ File: README.info, Node: Commands, Next: Queries, Up: Usage
============ ============
• *Jumping to an entry:* • *Jumping to an entry:*
• (command) • and related commands
• (command) • • *Showing an agenda-like view:*
• *Showing an agenda-like view:* • • • • • *Showing a tree in a buffer:*
• (command)
• (command)
• (command)
• (command)
• *Showing a tree in a buffer:*
• (command)
* Menu: * Menu:
* org-ql-find:: * org-ql-find::
@ -225,11 +219,9 @@ _Note: These commands use ._
These commands jump to a heading selected using Emacss built-in These commands jump to a heading selected using Emacss built-in
completion facilities with an Org QL query: 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-path searches only headings (using the org-ql-find-in-agenda searches in (org-agenda-files).
outline-path: predicate). org-ql-find-in-org-directory searches in org-directory.
org-ql-find-heading searches only headings (using the heading:
predicate).
 
File: README.info, Node: org-ql-search, Next: helm-org-ql, Prev: org-ql-find, Up: Commands 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: Helm support3047
Node: Usage3450 Node: Usage3450
Node: Commands3848 Node: Commands3848
Node: org-ql-find4353 Node: org-ql-find4274
Node: org-ql-search4867 Node: org-ql-search4740
Node: helm-org-ql6561 Node: helm-org-ql6434
Node: org-ql-view6939 Node: org-ql-view6812
Node: org-ql-view-sidebar7469 Node: org-ql-view-sidebar7342
Node: org-ql-view-recent-items7849 Node: org-ql-view-recent-items7722
Node: org-ql-sparse-tree8345 Node: org-ql-sparse-tree8218
Node: Queries9145 Node: Queries9018
Node: Non-sexp query syntax10262 Node: Non-sexp query syntax10135
Node: General predicates12021 Node: General predicates11894
Node: Ancestor/descendant predicates18763 Node: Ancestor/descendant predicates18636
Node: Date/time predicates19891 Node: Date/time predicates19764
Node: Functions / Macros23015 Node: Functions / Macros22888
Node: Agenda-like views23313 Node: Agenda-like views23186
Ref: Function org-ql-block23475 Ref: Function org-ql-block23348
Node: Listing / acting-on results24736 Node: Listing / acting-on results24609
Ref: Caching24944 Ref: Caching24817
Ref: Function org-ql-select25857 Ref: Function org-ql-select25730
Ref: Function org-ql-query28283 Ref: Function org-ql-query28156
Ref: Macro org-ql (deprecated)30057 Ref: Macro org-ql (deprecated)29930
Node: Custom predicates30372 Node: Custom predicates30245
Ref: Macro org-ql-defpred30596 Ref: Macro org-ql-defpred30469
Node: Dynamic block34037 Node: Dynamic block33910
Node: Links36761 Node: Links36634
Node: Tips37448 Node: Tips37321
Node: Changelog37772 Node: Changelog37645
Node: 07-pre38540 Node: 07-pre38413
Node: 06239947 Node: 06239820
Node: 06140255 Node: 06140128
Node: 0640823 Node: 0640696
Node: 05243877 Node: 05243750
Node: 05144177 Node: 05144050
Node: 0544600 Node: 0544473
Node: 04946129 Node: 04946002
Node: 04846409 Node: 04846282
Node: 04746756 Node: 04746629
Node: 04647165 Node: 04647038
Node: 04547573 Node: 04547446
Node: 04447934 Node: 04447807
Node: 04348293 Node: 04348166
Node: 04248496 Node: 04248369
Node: 04148657 Node: 04148530
Node: 0448904 Node: 0448777
Node: 03253005 Node: 03252878
Node: 03153408 Node: 03153281
Node: 0353605 Node: 0353478
Node: 02356905 Node: 02356778
Node: 02257139 Node: 02257012
Node: 02157419 Node: 02157292
Node: 0257624 Node: 0257497
Node: 0161702 Node: 0161575
Node: Notes61803 Node: Notes61676
Node: Comparison with Org Agenda searches61965 Node: Comparison with Org Agenda searches61838
Node: org-sidebar62854 Node: org-sidebar62727
Node: License63133 Node: License63006
 
End Tag Table End Tag Table