From 641ec0ac5094d075d46a95fc18747085bed45a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Antol=C3=ADn=20Camarena?= Date: Fri, 8 Sep 2023 13:55:36 -0600 Subject: [PATCH 1/2] Add category metadatum to org-ql-completing-read This is all that is needed to gain support for Embark actions on org-ql-find candidates. --- org-ql-completing-read.el | 1 + 1 file changed, 1 insertion(+) diff --git a/org-ql-completing-read.el b/org-ql-completing-read.el index 0c4e70ed..e224e4b1 100644 --- a/org-ql-completing-read.el +++ b/org-ql-completing-read.el @@ -180,6 +180,7 @@ single predicate)." (collection (input _pred flag) (pcase flag ('metadata (list 'metadata + (cons 'category 'org-heading) (cons 'group-function #'group) (cons 'affixation-function #'affix) (cons 'annotation-function #'annotate))) From a41dfe25ea2ae56dba66a13bf48749df63cf537d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 27 Sep 2023 15:02:40 -0500 Subject: [PATCH 2/2] Docs: Update changelog, usage --- README.org | 9 ++++ org-ql.info | 144 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 93 insertions(+), 60 deletions(-) diff --git a/README.org b/README.org index 3b50485a..fe5e9af6 100644 --- a/README.org +++ b/README.org @@ -114,6 +114,8 @@ These commands jump to a heading selected using Emacs's built-in completion faci - ~org-ql-find-in-agenda~ searches in ~(org-agenda-files)~. - ~org-ql-find-in-org-directory~ searches in ~org-directory~. +Note that these commands are compatible with [[https://github.com/oantolin/embark][Embark]]: the ~embark-act~ command can be called on a completion candidate (i.e. a search result) to act on it immediately, without having to visit the entry in its source Org buffer. + [[images/org-ql-find.png]] *** org-ql-refile @@ -146,6 +148,8 @@ Read ~QUERY~ and search with ~org-ql~. Interactively, prompt for these variable *Note:* The view buffer is currently put in ~org-agenda-mode~, which means that /some/ Org Agenda commands work, such as jumping to entries and changing item priorities (without necessarily updating the view). This feature is experimental and not guaranteed to work correctly with all commands. (It works to the extent it does because the appropriate text properties are placed on each item, imitating an Agenda buffer.) +*Note:* Also, this buffer is compatible with [[https://github.com/oantolin/embark][Embark]]: the ~embark-act~ command can be called on an entry to act on it immediately, without having to visit the entry in its source Org buffer. + *** helm-org-ql /Note: This command uses [[#non-sexp-query-syntax][non-sexp queries]]. It is available separately in the package =helm-org-ql=./ @@ -544,7 +548,12 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8-pre +*Additions* + ++ Function ~org-ql-completing-read~, used by command ~org-ql-find~, now specifies the completion category as ~org-heading~, providing compatibility with [[https://github.com/oantolin/embark][Embark]]. (This is a powerful feature, as it means any ~org-ql-find~ result can be acted on from inside the search results with Embark, which provides common actions from Org Agenda and Org speed keys bindings.) ([[https://github.com/alphapapa/org-ql/issues/299][#299]]. Thanks to [[https://github.com/oantolin][Omar Antolín Camarena]], [[https://github.com/minad][Daniel Mendler]], and [[https://github.com/akirak][Akira Komamura]].) + *Compatibility* + + Org v9.7's ~org-element~ API changes required some adjustments. ([[https://github.com/alphapapa/org-ql/issues/364][#364]]. Thanks to several users for reporting, and to [[https://github.com/yantar92][Ihor Radchenko]] for his feedback.) ** 0.7.2 diff --git a/org-ql.info b/org-ql.info index 10eeb2f0..2101987c 100644 --- a/org-ql.info +++ b/org-ql.info @@ -229,6 +229,11 @@ completion facilities with an Org QL query: • ‘org-ql-find-in-agenda’ searches in ‘(org-agenda-files)’. • ‘org-ql-find-in-org-directory’ searches in ‘org-directory’. + Note that these commands are compatible with Embark +(https://github.com/oantolin/embark): the ‘embark-act’ command can be +called on a completion candidate (i.e. a search result) to act on it +immediately, without having to visit the entry in its source Org buffer. +  File: README.info, Node: org-ql-refile, Next: org-ql-search, Prev: org-ql-find, Up: Commands @@ -282,6 +287,11 @@ This feature is experimental and not guaranteed to work correctly with all commands. (It works to the extent it does because the appropriate text properties are placed on each item, imitating an Agenda buffer.) + *Note:* Also, this buffer is compatible with Embark +(https://github.com/oantolin/embark): the ‘embark-act’ command can be +called on an entry to act on it immediately, without having to visit the +entry in its source Org buffer. +  File: README.info, Node: helm-org-ql, Next: org-ql-view, Prev: org-ql-search, Up: Commands @@ -1029,7 +1039,21 @@ File: README.info, Node: 08-pre, Next: 072, Up: Changelog 5.1 0.8-pre =========== -*Compatibility* +*Additions* + + • Function ‘org-ql-completing-read’, used by command ‘org-ql-find’, + now specifies the completion category as ‘org-heading’, providing + compatibility with Embark (https://github.com/oantolin/embark). + (This is a powerful feature, as it means any ‘org-ql-find’ result + can be acted on from inside the search results with Embark, which + provides common actions from Org Agenda and Org speed keys + bindings.) (#299 (https://github.com/alphapapa/org-ql/issues/299). + Thanks to Omar Antolín Camarena (https://github.com/oantolin), + Daniel Mendler (https://github.com/minad), and Akira Komamura + (https://github.com/akirak).) + + *Compatibility* + • Org v9.7’s ‘org-element’ API changes required some adjustments. (#364 (https://github.com/alphapapa/org-ql/issues/364). Thanks to several users for reporting, and to Ihor Radchenko @@ -1769,65 +1793,65 @@ Node: Helm support3093 Node: Usage3496 Node: Commands3894 Node: org-ql-find4338 -Node: org-ql-refile4804 -Node: org-ql-search5127 -Node: helm-org-ql6823 -Node: org-ql-view7201 -Node: org-ql-view-sidebar7731 -Node: org-ql-view-recent-items8111 -Node: org-ql-sparse-tree8607 -Node: Queries9407 -Node: Non-sexp query syntax10524 -Node: General predicates12283 -Node: Ancestor/descendant predicates19270 -Node: Date/time predicates20398 -Node: Functions / Macros23522 -Node: Agenda-like views23820 -Ref: Function org-ql-block23982 -Node: Listing / acting-on results25243 -Ref: Caching25451 -Ref: Function org-ql-select26364 -Ref: Function org-ql-query28790 -Ref: Macro org-ql (deprecated)30564 -Node: Custom predicates30879 -Ref: Macro org-ql-defpred31103 -Node: Dynamic block34544 -Node: Links37268 -Node: Tips37955 -Node: Changelog38279 -Node: 08-pre39075 -Node: 07239440 -Node: 07140362 -Node: 0741171 -Node: 06344095 -Node: 06244626 -Node: 06144931 -Node: 0645499 -Node: 05248553 -Node: 05148853 -Node: 0549278 -Node: 04950809 -Node: 04851091 -Node: 04751440 -Node: 04651849 -Node: 04552257 -Node: 04452618 -Node: 04352977 -Node: 04253180 -Node: 04153341 -Node: 0453588 -Node: 03257689 -Node: 03158092 -Node: 0358289 -Node: 02361589 -Node: 02261823 -Node: 02162103 -Node: 0262308 -Node: 0166386 -Node: Notes66487 -Node: Comparison with Org Agenda searches66649 -Node: org-sidebar67538 -Node: License67817 +Node: org-ql-refile5077 +Node: org-ql-search5400 +Node: helm-org-ql7331 +Node: org-ql-view7709 +Node: org-ql-view-sidebar8239 +Node: org-ql-view-recent-items8619 +Node: org-ql-sparse-tree9115 +Node: Queries9915 +Node: Non-sexp query syntax11032 +Node: General predicates12791 +Node: Ancestor/descendant predicates19778 +Node: Date/time predicates20906 +Node: Functions / Macros24030 +Node: Agenda-like views24328 +Ref: Function org-ql-block24490 +Node: Listing / acting-on results25751 +Ref: Caching25959 +Ref: Function org-ql-select26872 +Ref: Function org-ql-query29298 +Ref: Macro org-ql (deprecated)31072 +Node: Custom predicates31387 +Ref: Macro org-ql-defpred31611 +Node: Dynamic block35052 +Node: Links37776 +Node: Tips38463 +Node: Changelog38787 +Node: 08-pre39583 +Node: 07240645 +Node: 07141567 +Node: 0742376 +Node: 06345300 +Node: 06245831 +Node: 06146136 +Node: 0646704 +Node: 05249758 +Node: 05150058 +Node: 0550483 +Node: 04952014 +Node: 04852296 +Node: 04752645 +Node: 04653054 +Node: 04553462 +Node: 04453823 +Node: 04354182 +Node: 04254385 +Node: 04154546 +Node: 0454793 +Node: 03258894 +Node: 03159297 +Node: 0359494 +Node: 02362794 +Node: 02263028 +Node: 02163308 +Node: 0263513 +Node: 0167591 +Node: Notes67692 +Node: Comparison with Org Agenda searches67854 +Node: org-sidebar68743 +Node: License69022  End Tag Table