From 5bba08403deda018706e6a730a0dafc3b39c76bc Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 16 Jun 2021 17:26:44 -0500 Subject: [PATCH 1/5] Meta: 0.5.2-pre --- README.org | 4 ++ org-ql.el | 2 +- org-ql.info | 151 ++++++++++++++++++++++++++++------------------------ 3 files changed, 86 insertions(+), 71 deletions(-) diff --git a/README.org b/README.org index 54f5cf1..8466254 100644 --- a/README.org +++ b/README.org @@ -461,6 +461,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. +** 0.5.2-pre + +Nothing yet. + ** 0.5.1 *Fixed* diff --git a/org-ql.el b/org-ql.el index fc4f218..d7a58af 100644 --- a/org-ql.el +++ b/org-ql.el @@ -2,7 +2,7 @@ ;; Author: Adam Porter ;; Url: https://github.com/alphapapa/org-ql -;; Version: 0.5.1 +;; Version: 0.5.2-pre ;; Package-Requires: ((emacs "26.1") (dash "2.13") (dash-functional "1.2.0") (f "0.17.2") (map "2.1") (org "9.0") (org-super-agenda "1.2") (ov "1.0.6") (peg "0.6") (s "1.12.0") (transient "0.1") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda diff --git a/org-ql.info b/org-ql.info index a9e2afa..50c1337 100644 --- a/org-ql.info +++ b/org-ql.info @@ -66,6 +66,7 @@ Functions / Macros Changelog +* 0.5.2-pre: 052-pre. * 0.5.1: 051. * 0.5: 05. * 0.4.9: 049. @@ -832,6 +833,7 @@ releases. * Menu: +* 0.5.2-pre: 052-pre. * 0.5.1: 051. * 0.5: 05. * 0.4.9: 049. @@ -854,9 +856,17 @@ releases. * 0.1: 01.  -File: README.info, Node: 051, Next: 05, Up: Changelog +File: README.info, Node: 052-pre, Next: 051, Up: Changelog -5.1 0.5.1 +5.1 0.5.2-pre +============= + +Nothing yet. + + +File: README.info, Node: 051, Next: 05, Prev: 052-pre, Up: Changelog + +5.2 0.5.1 ========= *Fixed* @@ -869,7 +879,7 @@ File: README.info, Node: 051, Next: 05, Up: Changelog  File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog -5.2 0.5 +5.3 0.5 ======= *Added* @@ -910,7 +920,7 @@ File: README.info, Node: 05, Next: 049, Prev: 051, Up: Changelog  File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog -5.3 0.4.9 +5.4 0.4.9 ========= *Fixed* @@ -921,7 +931,7 @@ File: README.info, Node: 049, Next: 048, Prev: 05, Up: Changelog  File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog -5.4 0.4.8 +5.5 0.4.8 ========= *Fixed* @@ -933,7 +943,7 @@ File: README.info, Node: 048, Next: 047, Prev: 049, Up: Changelog  File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog -5.5 0.4.7 +5.6 0.4.7 ========= *Fixed* @@ -946,7 +956,7 @@ File: README.info, Node: 047, Next: 046, Prev: 048, Up: Changelog  File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog -5.6 0.4.6 +5.7 0.4.6 ========= *Fixed* @@ -959,7 +969,7 @@ File: README.info, Node: 046, Next: 045, Prev: 047, Up: Changelog  File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog -5.7 0.4.5 +5.8 0.4.5 ========= *Fixed* @@ -971,7 +981,7 @@ File: README.info, Node: 045, Next: 044, Prev: 046, Up: Changelog  File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog -5.8 0.4.4 +5.9 0.4.4 ========= *Fixed* @@ -983,8 +993,8 @@ File: README.info, Node: 044, Next: 043, Prev: 045, Up: Changelog  File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog -5.9 0.4.3 -========= +5.10 0.4.3 +========== *Fixed* • When org-ql-view-refresh is called, ensure the buffer is an Org QL @@ -993,7 +1003,7 @@ File: README.info, Node: 043, Next: 042, Prev: 044, Up: Changelog  File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog -5.10 0.4.2 +5.11 0.4.2 ========== *Fixed* @@ -1002,7 +1012,7 @@ File: README.info, Node: 042, Next: 041, Prev: 043, Up: Changelog  File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog -5.11 0.4.1 +5.12 0.4.1 ========== *Fixed* @@ -1012,7 +1022,7 @@ File: README.info, Node: 041, Next: 04, Prev: 042, Up: Changelog  File: README.info, Node: 04, Next: 032, Prev: 041, Up: Changelog -5.12 0.4 +5.13 0.4 ======== _Note:_ The next release, 0.5, may include changes which will require @@ -1093,7 +1103,7 @@ as they will be pushed to the master branch when ready.  File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog -5.13 0.3.2 +5.14 0.3.2 ========== *Fixed* @@ -1106,7 +1116,7 @@ File: README.info, Node: 032, Next: 031, Prev: 04, Up: Changelog  File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog -5.14 0.3.1 +5.15 0.3.1 ========== *Fixed* @@ -1116,7 +1126,7 @@ File: README.info, Node: 031, Next: 03, Prev: 032, Up: Changelog  File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog -5.15 0.3 +5.16 0.3 ======== *Added* @@ -1181,7 +1191,7 @@ File: README.info, Node: 03, Next: 023, Prev: 031, Up: Changelog  File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog -5.16 0.2.3 +5.17 0.2.3 ========== *Fixed* @@ -1191,7 +1201,7 @@ File: README.info, Node: 023, Next: 022, Prev: 03, Up: Changelog  File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog -5.17 0.2.2 +5.18 0.2.2 ========== *Fixed* @@ -1202,7 +1212,7 @@ File: README.info, Node: 022, Next: 021, Prev: 023, Up: Changelog  File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog -5.18 0.2.1 +5.19 0.2.1 ========== *Fixed* @@ -1212,7 +1222,7 @@ File: README.info, Node: 021, Next: 02, Prev: 022, Up: Changelog  File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog -5.19 0.2 +5.20 0.2 ======== *Added* @@ -1295,7 +1305,7 @@ File: README.info, Node: 02, Next: 01, Prev: 021, Up: Changelog  File: README.info, Node: 01, Prev: 02, Up: Changelog -5.20 0.1 +5.21 0.1 ======== First tagged release. @@ -1353,54 +1363,55 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1601 -Node: Screenshots1724 -Node: Installation1842 -Node: Quelpa2480 -Node: Usage2923 -Node: Commands3321 -Node: org-ql-search3794 -Node: helm-org-ql5444 -Node: org-ql-view5856 -Node: org-ql-view-sidebar6356 -Node: org-ql-view-recent-items6712 -Node: org-ql-sparse-tree7196 -Node: Queries7996 -Node: Non-sexp query syntax9107 -Node: General predicates10814 -Node: Ancestor/descendant predicates16227 -Node: Date/time predicates17355 -Node: Functions / Macros20010 -Node: Agenda-like views20265 -Node: Listing / acting-on results21670 -Node: Dynamic block26865 -Node: Links29563 -Node: Tips30250 -Node: Changelog30568 -Node: 05131259 -Node: 0531664 -Node: 04933138 -Node: 04833412 -Node: 04733759 -Node: 04634154 -Node: 04534554 -Node: 04434913 -Node: 04335270 -Node: 04235465 -Node: 04135626 -Node: 0435867 -Node: 03239800 -Node: 03140179 -Node: 0340376 -Node: 02343351 -Node: 02243579 -Node: 02143847 -Node: 0244046 -Node: 0148081 -Node: Notes48182 -Node: Comparison with Org Agenda searches48344 -Node: org-sidebar49216 -Node: License49495 +Node: Contents1624 +Node: Screenshots1747 +Node: Installation1865 +Node: Quelpa2503 +Node: Usage2946 +Node: Commands3344 +Node: org-ql-search3817 +Node: helm-org-ql5467 +Node: org-ql-view5879 +Node: org-ql-view-sidebar6379 +Node: org-ql-view-recent-items6735 +Node: org-ql-sparse-tree7219 +Node: Queries8019 +Node: Non-sexp query syntax9130 +Node: General predicates10837 +Node: Ancestor/descendant predicates16250 +Node: Date/time predicates17378 +Node: Functions / Macros20033 +Node: Agenda-like views20288 +Node: Listing / acting-on results21693 +Node: Dynamic block26888 +Node: Links29586 +Node: Tips30273 +Node: Changelog30591 +Node: 052-pre31305 +Node: 05131413 +Node: 0531834 +Node: 04933308 +Node: 04833582 +Node: 04733929 +Node: 04634324 +Node: 04534724 +Node: 04435083 +Node: 04335440 +Node: 04235637 +Node: 04135798 +Node: 0436039 +Node: 03239972 +Node: 03140351 +Node: 0340548 +Node: 02343523 +Node: 02243751 +Node: 02144019 +Node: 0244218 +Node: 0148253 +Node: Notes48354 +Node: Comparison with Org Agenda searches48516 +Node: org-sidebar49388 +Node: License49667  End Tag Table From c57f0975f68a0835d39e6d48cfee5945ce89774c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 16 Jun 2021 17:07:11 -0500 Subject: [PATCH 2/5] Tests: Add more LINK tests Closes https://github.com/alphapapa/org-ql/pull/222. See also https://github.com/alphapapa/org-ql/pull/220. Thanks to Akira Komamura (@akirak). --- tests/data.org | 2 +- tests/test-org-ql.el | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/data.org b/tests/data.org index b7a13cb..99875d8 100644 --- a/tests/data.org +++ b/tests/data.org @@ -81,7 +81,7 @@ SCHEDULED: <2017-07-05 Wed> If I don't, the frobnicator will probably fall off halfway to Mars... -Gotta buy one first, though. +Gotta buy one first, though. [[https://example.com/][This one]] looks suitable. * Recurring :PROPERTIES: diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index c9d560e..f273c57 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -644,7 +644,7 @@ RESULTS should be a list of strings as returned by (describe "(link)" (org-ql-it "without arguments" (org-ql-expect ('(link)) - '("/r/emacs"))) + '("Fix flux capacitor" "/r/emacs"))) (org-ql-it "with description-or-target" (org-ql-expect ('(link "emacs")) '("/r/emacs"))) @@ -656,6 +656,18 @@ RESULTS should be a list of strings as returned by '("/r/emacs"))) (org-ql-it "with :description and :target" (org-ql-expect ('(link :description "emacs" :target "reddit.com")) + '("/r/emacs"))) + (org-ql-it "with description-or-target regexp" + (org-ql-expect ('(link "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :description regexp" + (org-ql-expect ('(link :description "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :target regexp" + (org-ql-expect ('(link :target "em.cs" :regexp-p t)) + '("/r/emacs"))) + (org-ql-it "with :description and :target regexp" + (org-ql-expect ('(link :description "em.cs" :target "em.cs" :regexp-p t)) '("/r/emacs")))) (describe "(outline-path)" From e05de210c7acb80133b602ed1d2660aeb93912b5 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sun, 13 Jun 2021 23:36:28 +0900 Subject: [PATCH 3/5] Fix: (link) :target argument See #220. --- org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-ql.el b/org-ql.el index d7a58af..e675438 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1250,7 +1250,7 @@ any link is found." plist (cdr args)) (setf plist args)) (setf description (plist-get plist :description) - target (plist-get plist :description) + target (plist-get plist :target) regexp-p (plist-get plist :regexp-p)) (unless regexp-p ;; NOTE: It would also be preferable to avoid regexp-quoting every time this predicate From 0cc4c5b549e120a4ded5fa7d170c8797a4b54962 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 16 Jun 2021 17:38:07 -0500 Subject: [PATCH 4/5] Fix: (link) :regexp-p argument See #220. Thanks to Akira Komamura (@akirak). --- org-ql.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/org-ql.el b/org-ql.el index e675438..9ea5275 100644 --- a/org-ql.el +++ b/org-ql.el @@ -810,19 +810,26 @@ replace the clause with a preamble." ;; have to use `plist-get' here for now. Maybe when we drop ;; support for Emacs <28... (`(link ,(and description-or-target - (guard (not (keywordp description-or-target))))) + (guard (not (keywordp description-or-target)))) + . ,plist) (setq org-ql-preamble (org-ql--link-regexp :description-or-target - (regexp-quote description-or-target))) + (if (plist-get plist :regexp-p) + description-or-target + (regexp-quote description-or-target)))) nil) (`(link . ,plist) (setq org-ql-preamble (org-ql--link-regexp :description (when (plist-get plist :description) - (regexp-quote (plist-get plist :description))) + (if (plist-get plist :regexp-p) + (plist-get plist :description) + (regexp-quote (plist-get plist :description)))) :target (when (plist-get plist :target) - (regexp-quote (plist-get plist :target))))) + (if (plist-get plist :regexp-p) + (plist-get plist :target) + (regexp-quote (plist-get plist :target)))))) nil) ;; Planning lines. From eead60be8cf4395390ba26045b15108c7c9a5bc9 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Wed, 16 Jun 2021 17:40:26 -0500 Subject: [PATCH 5/5] Docs: Update changelog --- README.org | 5 ++- org-ql.info | 115 +++++++++++++++++++++++++++------------------------- 2 files changed, 62 insertions(+), 58 deletions(-) diff --git a/README.org b/README.org index 8466254..335f7e5 100644 --- a/README.org +++ b/README.org @@ -461,9 +461,10 @@ Simple links may also be written manually in either sexp or non-sexp form, like: /Note:/ Breaking changes may be made before version 1.0, but in the event of major changes, attempts at backward compatibility will be made with obsolescence declarations, translation of arguments, etc. Users who need stability guarantees before 1.0 may choose to use tagged stable releases. -** 0.5.2-pre +** 0.5.2 -Nothing yet. +*Fixed* ++ Predicate ~link~'s ~:target~ and ~:regexp-p~ arguments. ([[https://github.com/alphapapa/org-ql/pull/220][#220]]. Thanks to [[https://github.com/akirak][Akira Komamura]].) ** 0.5.1 diff --git a/org-ql.info b/org-ql.info index 50c1337..3127af3 100644 --- a/org-ql.info +++ b/org-ql.info @@ -66,7 +66,7 @@ Functions / Macros Changelog -* 0.5.2-pre: 052-pre. +* 0.5.2: 052. * 0.5.1: 051. * 0.5: 05. * 0.4.9: 049. @@ -833,7 +833,7 @@ releases. * Menu: -* 0.5.2-pre: 052-pre. +* 0.5.2: 052. * 0.5.1: 051. * 0.5: 05. * 0.4.9: 049. @@ -856,15 +856,18 @@ releases. * 0.1: 01.  -File: README.info, Node: 052-pre, Next: 051, Up: Changelog +File: README.info, Node: 052, Next: 051, Up: Changelog -5.1 0.5.2-pre -============= +5.1 0.5.2 +========= -Nothing yet. +*Fixed* + • Predicate ‘link’’s ‘:target’ and ‘:regexp-p’ arguments. (#220 + (https://github.com/alphapapa/org-ql/pull/220). Thanks to Akira + Komamura (https://github.com/akirak).)  -File: README.info, Node: 051, Next: 05, Prev: 052-pre, Up: Changelog +File: README.info, Node: 051, Next: 05, Prev: 052, Up: Changelog 5.2 0.5.1 ========= @@ -1363,55 +1366,55 @@ GPLv3  Tag Table: Node: Top225 -Node: Contents1624 -Node: Screenshots1747 -Node: Installation1865 -Node: Quelpa2503 -Node: Usage2946 -Node: Commands3344 -Node: org-ql-search3817 -Node: helm-org-ql5467 -Node: org-ql-view5879 -Node: org-ql-view-sidebar6379 -Node: org-ql-view-recent-items6735 -Node: org-ql-sparse-tree7219 -Node: Queries8019 -Node: Non-sexp query syntax9130 -Node: General predicates10837 -Node: Ancestor/descendant predicates16250 -Node: Date/time predicates17378 -Node: Functions / Macros20033 -Node: Agenda-like views20288 -Node: Listing / acting-on results21693 -Node: Dynamic block26888 -Node: Links29586 -Node: Tips30273 -Node: Changelog30591 -Node: 052-pre31305 -Node: 05131413 -Node: 0531834 -Node: 04933308 -Node: 04833582 -Node: 04733929 -Node: 04634324 -Node: 04534724 -Node: 04435083 -Node: 04335440 -Node: 04235637 -Node: 04135798 -Node: 0436039 -Node: 03239972 -Node: 03140351 -Node: 0340548 -Node: 02343523 -Node: 02243751 -Node: 02144019 -Node: 0244218 -Node: 0148253 -Node: Notes48354 -Node: Comparison with Org Agenda searches48516 -Node: org-sidebar49388 -Node: License49667 +Node: Contents1616 +Node: Screenshots1739 +Node: Installation1857 +Node: Quelpa2495 +Node: Usage2938 +Node: Commands3336 +Node: org-ql-search3809 +Node: helm-org-ql5459 +Node: org-ql-view5871 +Node: org-ql-view-sidebar6371 +Node: org-ql-view-recent-items6727 +Node: org-ql-sparse-tree7211 +Node: Queries8011 +Node: Non-sexp query syntax9122 +Node: General predicates10829 +Node: Ancestor/descendant predicates16242 +Node: Date/time predicates17370 +Node: Functions / Macros20025 +Node: Agenda-like views20280 +Node: Listing / acting-on results21685 +Node: Dynamic block26880 +Node: Links29578 +Node: Tips30265 +Node: Changelog30583 +Node: 05231289 +Node: 05131578 +Node: 0531995 +Node: 04933469 +Node: 04833743 +Node: 04734090 +Node: 04634485 +Node: 04534885 +Node: 04435244 +Node: 04335601 +Node: 04235798 +Node: 04135959 +Node: 0436200 +Node: 03240133 +Node: 03140512 +Node: 0340709 +Node: 02343684 +Node: 02243912 +Node: 02144180 +Node: 0244379 +Node: 0148414 +Node: Notes48515 +Node: Comparison with Org Agenda searches48677 +Node: org-sidebar49549 +Node: License49828  End Tag Table