From 0e702ecb484673f8f8d85884f038fc0e84cb9bd3 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 4 Sep 2023 14:49:10 -0500 Subject: [PATCH 1/3] Change: Resolve Org element properties on 9.7+ See #364. --- org-ql-view.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/org-ql-view.el b/org-ql-view.el index d771d129..bbdada90 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -818,6 +818,20 @@ When opened, the link searches the buffer it's opened from." ;;;; Faces/properties +(defalias 'org-ql-view--resolve-element-properties + ;; It would be preferable to define this as an inline function, but + ;; that would mean that users would have to recompile org-ql when + ;; upgrading to Org 9.7 or else get weird errors. + ;; TODO(someday): Define `org-ql-view--resolve-element-properties' as inline. + (if (version<= "9.7" org-version) + (lambda (node) + "Resolve NODE's properties using `org-element-properties-resolve'." + ;; Silence warnings about `org-element-properties-resolve' + ;; being unresolved on earlier Org versions. + (with-no-warnings + (org-element-properties-resolve node 'force-undefer))) + #'identity)) + (defun org-ql-view--format-element (element) ;; This essentially needs to do what `org-agenda-format-item' does, ;; which is a lot. We are a long way from that, but it's a start. @@ -827,6 +841,7 @@ returned by `org-element-parse-buffer'. If ELEMENT is nil, return an empty string." (if (not element) "" + (setf element (org-ql-view--resolve-element-properties element)) (let* ((properties (cadr element)) ;; Remove the :parent property, which so bloats the size of ;; the properties list that it makes it essentially From 9e72bf694725adb9f1d256a4d52d6ceb7d71c6f1 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 12 Sep 2023 17:28:31 -0500 Subject: [PATCH 2/3] Fix: (org-ql-view--format-element) Check habit in source buffer See #364. --- org-ql-view.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org-ql-view.el b/org-ql-view.el index bbdada90..c81bcd7a 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -892,7 +892,8 @@ return an empty string." (char-to-string) (format "[#%s]") (org-ql-view--add-priority-face))) - (habit-property (org-with-point-at (org-element-property :begin element) + (habit-property (org-with-point-at (or (org-element-property :org-hd-marker element) + (org-element-property :org-marker element)) (when (org-is-habit-p) (org-habit-parse-todo)))) (due-string (pcase (org-element-property :relative-due-date element) From 5c9d4cdb485da19546bd2a7eb5407ebe528ce1cc Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 27 Sep 2023 13:40:30 -0500 Subject: [PATCH 3/3] Docs: Update changelog --- README.org | 3 +- org-ql.info | 207 ++++++++++++++++++++++++++++------------------------ 2 files changed, 113 insertions(+), 97 deletions(-) diff --git a/README.org b/README.org index 97cb1af4..3b50485a 100644 --- a/README.org +++ b/README.org @@ -544,7 +544,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like: ** 0.8-pre -Nothing new yet. +*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 c1e5e135..10eeb2f0 100644 --- a/org-ql.info +++ b/org-ql.info @@ -71,6 +71,7 @@ Functions / Macros Changelog +* 0.8-pre: 08-pre. * 0.7.2: 072. * 0.7.1: 071. * 0.7: 07. @@ -992,6 +993,7 @@ releases. * Menu: +* 0.8-pre: 08-pre. * 0.7.2: 072. * 0.7.1: 071. * 0.7: 07. @@ -1022,9 +1024,21 @@ releases. * 0.1: 01.  -File: README.info, Node: 072, Next: 071, Up: Changelog +File: README.info, Node: 08-pre, Next: 072, Up: Changelog -5.1 0.7.2 +5.1 0.8-pre +=========== + +*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 + (https://github.com/yantar92) for his feedback.) + + +File: README.info, Node: 072, Next: 071, Prev: 08-pre, Up: Changelog + +5.2 0.7.2 ========= *Fixes* @@ -1045,7 +1059,7 @@ File: README.info, Node: 072, Next: 071, Up: Changelog  File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog -5.2 0.7.1 +5.3 0.7.1 ========= *Fixes* @@ -1064,7 +1078,7 @@ File: README.info, Node: 071, Next: 07, Prev: 072, Up: Changelog  File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog -5.3 0.7 +5.4 0.7 ======= *Added* @@ -1124,7 +1138,7 @@ File: README.info, Node: 07, Next: 063, Prev: 071, Up: Changelog  File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog -5.4 0.6.3 +5.5 0.6.3 ========= *Fixed* @@ -1140,7 +1154,7 @@ File: README.info, Node: 063, Next: 062, Prev: 07, Up: Changelog  File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog -5.5 0.6.2 +5.6 0.6.2 ========= *Fixed* @@ -1151,7 +1165,7 @@ File: README.info, Node: 062, Next: 061, Prev: 063, Up: Changelog  File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog -5.6 0.6.1 +5.7 0.6.1 ========= *Fixed* @@ -1169,7 +1183,7 @@ File: README.info, Node: 061, Next: 06, Prev: 062, Up: Changelog  File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog -5.7 0.6 +5.8 0.6 ======= *Added* @@ -1236,7 +1250,7 @@ File: README.info, Node: 06, Next: 052, Prev: 061, Up: Changelog  File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog -5.8 0.5.2 +5.9 0.5.2 ========= *Fixed* @@ -1247,8 +1261,8 @@ File: README.info, Node: 052, Next: 051, Prev: 06, Up: Changelog  File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog -5.9 0.5.1 -========= +5.10 0.5.1 +========== *Fixed* • Custom sorting functions could corrupt the cache, causing items to @@ -1260,7 +1274,7 @@ File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.10 0.5 +5.11 0.5 ======== *Added* @@ -1301,7 +1315,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.11 0.4.9 +5.12 0.4.9 ========== *Fixed* @@ -1312,7 +1326,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.12 0.4.8 +5.13 0.4.8 ========== *Fixed* @@ -1324,7 +1338,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.13 0.4.7 +5.14 0.4.7 ========== *Fixed* @@ -1337,7 +1351,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.14 0.4.6 +5.15 0.4.6 ========== *Fixed* @@ -1350,7 +1364,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.15 0.4.5 +5.16 0.4.5 ========== *Fixed* @@ -1362,7 +1376,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.16 0.4.4 +5.17 0.4.4 ========== *Fixed* @@ -1374,7 +1388,7 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.17 0.4.3 +5.18 0.4.3 ========== *Fixed* @@ -1384,7 +1398,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.18 0.4.2 +5.19 0.4.2 ========== *Fixed* @@ -1393,7 +1407,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.19 0.4.1 +5.20 0.4.1 ========== *Fixed* @@ -1403,7 +1417,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.20 0.4 +5.21 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1484,7 +1498,7 @@ automatically, as they will be pushed to the ‘master’ branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.21 0.3.2 +5.22 0.3.2 ========== *Fixed* @@ -1497,7 +1511,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.22 0.3.1 +5.23 0.3.1 ========== *Fixed* @@ -1507,7 +1521,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.23 0.3 +5.24 0.3 ======== *Added* @@ -1575,7 +1589,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.24 0.2.3 +5.25 0.2.3 ========== *Fixed* @@ -1585,7 +1599,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.25 0.2.2 +5.26 0.2.2 ========== *Fixed* @@ -1596,7 +1610,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.26 0.2.1 +5.27 0.2.1 ========== *Fixed* @@ -1606,7 +1620,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.27 0.2 +5.28 0.2 ======== *Added* @@ -1689,7 +1703,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.28 0.1 +5.29 0.1 ======== First tagged release. @@ -1747,72 +1761,73 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1791 -Node: Screenshots1914 -Node: Installation2032 -Node: Quelpa2546 -Node: Helm support3074 -Node: Usage3477 -Node: Commands3875 -Node: org-ql-find4319 -Node: org-ql-refile4785 -Node: org-ql-search5108 -Node: helm-org-ql6804 -Node: org-ql-view7182 -Node: org-ql-view-sidebar7712 -Node: org-ql-view-recent-items8092 -Node: org-ql-sparse-tree8588 -Node: Queries9388 -Node: Non-sexp query syntax10505 -Node: General predicates12264 -Node: Ancestor/descendant predicates19251 -Node: Date/time predicates20379 -Node: Functions / Macros23503 -Node: Agenda-like views23801 -Ref: Function org-ql-block23963 -Node: Listing / acting-on results25224 -Ref: Caching25432 -Ref: Function org-ql-select26345 -Ref: Function org-ql-query28771 -Ref: Macro org-ql (deprecated)30545 -Node: Custom predicates30860 -Ref: Macro org-ql-defpred31084 -Node: Dynamic block34525 -Node: Links37249 -Node: Tips37936 -Node: Changelog38260 -Node: 07239037 -Node: 07139944 -Node: 0740753 -Node: 06343677 -Node: 06244208 -Node: 06144513 -Node: 0645081 -Node: 05248135 -Node: 05148435 -Node: 0548858 -Node: 04950389 -Node: 04850671 -Node: 04751020 -Node: 04651429 -Node: 04551837 -Node: 04452198 -Node: 04352557 -Node: 04252760 -Node: 04152921 -Node: 0453168 -Node: 03257269 -Node: 03157672 -Node: 0357869 -Node: 02361169 -Node: 02261403 -Node: 02161683 -Node: 0261888 -Node: 0165966 -Node: Notes66067 -Node: Comparison with Org Agenda searches66229 -Node: org-sidebar67118 -Node: License67397 +Node: Contents1810 +Node: Screenshots1933 +Node: Installation2051 +Node: Quelpa2565 +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  End Tag Table