diff --git a/README.org b/README.org index 277f489..1ecf6be 100644 --- a/README.org +++ b/README.org @@ -385,6 +385,11 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience *Internal* + Added generic node data cache to speed up recursive, tree-based queries. +** 0.3.1 + +*Fixed* ++ Compatibility with Org 9.2. Thanks to [[https://github.com/leungbk][Brian Leung]]. + ** 0.3 *Added* diff --git a/org-ql.el b/org-ql.el index f80b39a..4d30744 100644 --- a/org-ql.el +++ b/org-ql.el @@ -45,17 +45,6 @@ (require 'map) (require 'ts) -;;;; Compatibility - -(if (version< org-version "9.2") - (progn - (defalias 'org-timestamp-to-time #'org-timestamp--to-internal-time) - (defun org-ql--get-tags (&optional pos local) - (org-get-tags-at pos local))) - (defun org-ql--get-tags (&rest _ignore) - "Call `org-get-tags', ignoring arguments." - (org-get-tags))) - ;;;; Constants ;; Note the use of the `rx' `blank' keyword, which matches "horizontal" whitespace. @@ -77,6 +66,13 @@ match group.") "Regular expression matching Org \"planning\" lines. That is, \"CLOSED:\", \"DEADLINE:\", or \"SCHEDULED:\".") +(defconst org-ql-tag-line-re + "^\\*+ \\(?:.*[ \t]\\)?\\(:\\([[:alnum:]_@#%:]+\\):\\)[ \t]*$" + ;; Copied from `org-tag-line-re' from org.el. + "Regexp matching tags in a headline. +Tags are stored in match group 1. Match group 2 stores the tags +without the enclosing colons.") + ;;;; Variables (defvar org-ql--today nil) @@ -391,7 +387,8 @@ Returns cons (INHERITED-TAGS . LOCAL-TAGS)." ('org-ql-nil nil) (_ cached-result)) ;; Not found in cache: get tags and cache them. - (let* ((local-tags (or (org-ql--get-tags position 'local) + (let* ((local-tags (or (when (looking-at org-ql-tag-line-re) + (split-string (match-string-no-properties 2) ":" t)) 'org-ql-nil)) (inherited-tags (or (when org-use-tag-inheritance (save-excursion diff --git a/org-ql.info b/org-ql.info index fc04f59..fd67821 100644 --- a/org-ql.info +++ b/org-ql.info @@ -63,6 +63,7 @@ Functions / Macros Changelog * 0.4-pre: 04-pre. +* 0.3.1: 031. * 0.3: 03. * 0.2.3: 023. * 0.2.2: 022. @@ -678,6 +679,7 @@ releases. * Menu: * 0.4-pre: 04-pre. +* 0.3.1: 031. * 0.3: 03. * 0.2.3: 023. * 0.2.2: 022. @@ -686,7 +688,7 @@ releases. * 0.1: 01.  -File: README.info, Node: 04-pre, Next: 03, Up: Changelog +File: README.info, Node: 04-pre, Next: 031, Up: Changelog 5.1 0.4-pre =========== @@ -711,9 +713,19 @@ File: README.info, Node: 04-pre, Next: 03, Up: Changelog queries.  -File: README.info, Node: 03, Next: 023, Prev: 04-pre, Up: Changelog +File: README.info, Node: 031, Next: 03, Prev: 04-pre, Up: Changelog -5.2 0.3 +5.2 0.3.1 +========= + +*Fixed* + • Compatibility with Org 9.2. Thanks to Brian Leung + (https://github.com/leungbk). + + +File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog + +5.3 0.3 ======= *Added* @@ -778,7 +790,7 @@ File: README.info, Node: 03, Next: 023, Prev: 04-pre, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.3 0.2.3 +5.4 0.2.3 ========= *Fixed* @@ -788,7 +800,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.4 0.2.2 +5.5 0.2.2 ========= *Fixed* @@ -799,7 +811,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.5 0.2.1 +5.6 0.2.1 ========= *Fixed* @@ -809,7 +821,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.6 0.2 +5.7 0.2 ======= *Added* @@ -892,7 +904,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.7 0.1 +5.8 0.1 ======= First tagged release. @@ -953,37 +965,38 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1337 -Node: Screenshots1485 -Node: Installation1603 -Node: Quelpa2241 -Node: Usage2684 -Node: Commands3594 -Node: org-ql-search3823 -Node: helm-org-ql5471 -Node: org-ql-view5883 -Node: org-ql-view-sidebar6081 -Node: org-ql-view-recent-items6437 -Node: org-ql-sparse-tree6921 -Node: Queries7721 -Node: Non-sexp query syntax8563 -Node: Predicates10063 -Node: Date/time predicates15182 -Node: Functions / Macros17817 -Node: Agenda-like views18004 -Node: Listing / acting-on results19409 -Node: Changelog24011 -Node: 04-pre24518 -Node: 0325461 -Node: 02328437 -Node: 02228663 -Node: 02128929 -Node: 0229126 -Node: 0133159 -Node: Notes33258 -Node: Comparison with Org Agenda searches33420 -Node: org-sidebar34291 -Node: License34570 +Node: Contents1352 +Node: Screenshots1500 +Node: Installation1618 +Node: Quelpa2256 +Node: Usage2699 +Node: Commands3609 +Node: org-ql-search3838 +Node: helm-org-ql5486 +Node: org-ql-view5898 +Node: org-ql-view-sidebar6096 +Node: org-ql-view-recent-items6452 +Node: org-ql-sparse-tree6936 +Node: Queries7736 +Node: Non-sexp query syntax8578 +Node: Predicates10078 +Node: Date/time predicates15197 +Node: Functions / Macros17832 +Node: Agenda-like views18019 +Node: Listing / acting-on results19424 +Node: Changelog24026 +Node: 04-pre24548 +Node: 03125492 +Node: 0325690 +Node: 02328663 +Node: 02228889 +Node: 02129155 +Node: 0229352 +Node: 0133385 +Node: Notes33484 +Node: Comparison with Org Agenda searches33646 +Node: org-sidebar34517 +Node: License34796  End Tag Table