From be7ac9921d819cae3d1f1115b3ff284a79d3ed27 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 19 Oct 2019 01:00:45 -0500 Subject: [PATCH 1/5] Meta: 0.3.2-pre --- org-ql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-ql.el b/org-ql.el index 7d17352..cbb8137 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.3.1 +;; Version: 0.3.2-pre ;; Package-Requires: ((emacs "26.1") (dash "2.13") (dash-functional "1.2.0") (org "9.0") (org-super-agenda "1.2-pre") (ov "1.0.6") (peg "0.6") (s "1.12.0") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda From f2910261e2eea2f6c48b2e70b207b0f242b957cf Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 19 Oct 2019 01:06:22 -0500 Subject: [PATCH 2/5] Fix: (org-ql-search) Accept symbol as arg to :super-groups --- README.org | 5 +++++ org-ql-search.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index f3a79b5..8f9a8b1 100644 --- a/README.org +++ b/README.org @@ -363,6 +363,11 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience /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.3.2-pre + +*Fixed* ++ In =org-ql-search=, accept symbol as ~:super-groups~ argument. + ** 0.3.1 *Fixed* diff --git a/org-ql-search.el b/org-ql-search.el index 45f349a..6d96871 100644 --- a/org-ql-search.el +++ b/org-ql-search.el @@ -166,7 +166,9 @@ necessary." (org-ql-view-super-groups super-groups) (org-ql-view-title title)) (when super-groups - (let ((org-super-agenda-groups super-groups)) + (let ((org-super-agenda-groups (cl-etypecase super-groups + (symbol (symbol-value super-groups)) + (list super-groups)))) (setf strings (org-super-agenda--group-items strings)))) (org-ql-view--display :buffer buffer :header header :string (s-join "\n" strings)))) From 43b94dd4a819c49346737a07ca508e7684ad50b6 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 19 Oct 2019 01:07:15 -0500 Subject: [PATCH 3/5] Fix: (org-ql-views) Beginning/end-of-week timestamp times --- README.org | 1 + org-ql-view.el | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index 8f9a8b1..270230b 100644 --- a/README.org +++ b/README.org @@ -367,6 +367,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience *Fixed* + In =org-ql-search=, accept symbol as ~:super-groups~ argument. ++ In the =This week= and =Next week= default =org-ql-views= views, set timestamps for beginning-of-week to 00:00:00 and end-of-week to 23:59:59. ** 0.3.1 diff --git a/org-ql-view.el b/org-ql-view.el index d65a7a7..1519873 100644 --- a/org-ql-view.el +++ b/org-ql-view.el @@ -147,8 +147,13 @@ See info node `(elisp)Cyclic Window Ordering'." (cons "This week" (lambda () "Show items with an active timestamp during this calendar week." (interactive) - (let* ((beg-of-week (ts-adjust 'day (- (ts-dow (ts-now))) (ts-now))) - (end-of-week (ts-adjust 'day (- 6 (ts-dow (ts-now))) (ts-now)))) + (let* ((ts (ts-now)) + (beg-of-week (->> ts + (ts-adjust 'day (- (ts-dow (ts-now)))) + (ts-apply :hour 0 :minute 0 :second 0))) + (end-of-week (->> ts + (ts-adjust 'day (- 6 (ts-dow (ts-now)))) + (ts-apply :hour 23 :minute 59 :second 59)))) (org-ql-search (org-agenda-files) `(ts-active :from ,beg-of-week :to ,end-of-week) @@ -159,8 +164,12 @@ See info node `(elisp)Cyclic Window Ordering'." "Show items with an active timestamp during the next calendar week." (interactive) (let* ((ts (ts-adjust 'day 7 (ts-now))) - (beg-of-week (ts-adjust 'day (- (ts-dow (ts-now))) ts)) - (end-of-week (ts-adjust 'day (- 6 (ts-dow (ts-now))) ts))) + (beg-of-week (->> ts + (ts-adjust 'day (- (ts-dow (ts-now)))) + (ts-apply :hour 0 :minute 0 :second 0))) + (end-of-week (->> ts + (ts-adjust 'day (- 6 (ts-dow (ts-now)))) + (ts-apply :hour 23 :minute 59 :second 59)))) (org-ql-search (org-agenda-files) `(ts-active :from ,beg-of-week :to ,end-of-week) From 7a4a41e402ab97a9a6cc3d09f8dbb975a78b1f2b Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 19 Oct 2019 01:53:34 -0500 Subject: [PATCH 4/5] Fix: Quoted phrase plain-string queries --- README.org | 1 + org-ql.el | 2 +- tests/test-org-ql.el | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 270230b..f073f02 100644 --- a/README.org +++ b/README.org @@ -368,6 +368,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience *Fixed* + In =org-ql-search=, accept symbol as ~:super-groups~ argument. + In the =This week= and =Next week= default =org-ql-views= views, set timestamps for beginning-of-week to 00:00:00 and end-of-week to 23:59:59. ++ Plain quoted-phrases in non-sexp queries. ** 0.3.1 diff --git a/org-ql.el b/org-ql.el index cbb8137..db1d8d9 100644 --- a/org-ql.el +++ b/org-ql.el @@ -1296,7 +1296,7 @@ Multiple predicates are combined with BOOLEAN." (and predicate-without-args `(pred -- (list (intern pred)))) (and plain-string `(s -- (list 'regexp s)))) (opt (+ (syntax-class whitespace) (any))))) - (plain-string (substring (+ (not (syntax-class whitespace)) (any)))) + (plain-string (or quoted-arg unquoted-arg)) (predicate-with-args (substring predicate) ":" args) (predicate-without-args (substring predicate) ":") (predicate (or ,@predicates)) diff --git a/tests/test-org-ql.el b/tests/test-org-ql.el index c7b95bc..483b703 100644 --- a/tests/test-org-ql.el +++ b/tests/test-org-ql.el @@ -235,6 +235,8 @@ RESULTS should be a list of strings as returned by (expect (org-ql--plain-query "scheduled") ;; No colon after keyword, so not a predicate query. :to-equal '(regexp "scheduled")) + (expect (org-ql--plain-query "\"quoted phrase\"") + :to-equal '(regexp "quoted phrase")) (expect (org-ql--plain-query "regexp:word") :to-equal '(regexp "word")) (expect (org-ql--plain-query "regexp:\"quoted phrase\"") From 2274efce077c7cf8b2930a8bfb9980c251d8e737 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Sat, 19 Oct 2019 01:09:05 -0500 Subject: [PATCH 5/5] Release: 0.3.2 --- README.org | 2 +- org-ql.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index f073f02..5637cc6 100644 --- a/README.org +++ b/README.org @@ -363,7 +363,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience /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.3.2-pre +** 0.3.2 *Fixed* + In =org-ql-search=, accept symbol as ~:super-groups~ argument. diff --git a/org-ql.el b/org-ql.el index db1d8d9..04d8974 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.3.2-pre +;; Version: 0.3.2 ;; Package-Requires: ((emacs "26.1") (dash "2.13") (dash-functional "1.2.0") (org "9.0") (org-super-agenda "1.2-pre") (ov "1.0.6") (peg "0.6") (s "1.12.0") (ts "0.2-pre")) ;; Keywords: hypermedia, outlines, Org, agenda