Skip to content

Commit

Permalink
Merge: v0.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Jun 26, 2024
2 parents 5ef4364 + c2b4404 commit f24d93f
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 128 deletions.
10 changes: 10 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,16 @@ Nothing new yet.

Tagged v0.6.2, fixing a compilation warning.

** 0.8.7

*Fixes*
+ Timestamps with internal time ranges (e.g. ~<2024-06-26 10:00-11:00>~) are matched for simple queries. (This support is not yet comprehensive, e.g. a query that depends on the specific inner time range may not behave as expected. Previously such timestamps were not matched at all. See [[https://github.com/alphapapa/org-ql/pull/237][#237]] and [[https://github.com/alphapapa/org-ql/issues/371][#371]]. Thanks to [[https://github.com/yantar92][Ihor Radchenko]].)
+ Timestamps with day-of-the-week abbreviations are matched more flexibly (allowing, e.g. a period in French locales). (See [[https://github.com/alphapapa/org-ql/discussions/429][#429]], [[https://github.com/alphapapa/org-ql/issues/432][#432]]. Thanks to [[https://github.com/neurolit][Florian D.]] for reporting.)
+ Command ~org-ql-search~ did not narrow properly when called interactively.

*Compatibility*
+ Dynamic blocks work with Org 9.7. ([[https://github.com/alphapapa/org-ql/issues/431][#431]]. Thanks to [[https://github.com/jezcope][Jez Cope]] for reporting.)

** 0.8.6

*Fixes*
Expand Down
5 changes: 3 additions & 2 deletions org-ql-search.el
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ necessary."
(interactive (list (org-ql-view--complete-buffers-files)
(read-string "Query: " (when org-ql-view-query
(format "%S" org-ql-view-query)))
:narrow (or org-ql-view-narrow (eq current-prefix-arg '(4)))
:narrow (or org-ql-view-narrow (equal current-prefix-arg '(4)))
:super-groups (org-ql-view--complete-super-groups)
:sort (org-ql-view--complete-sort)))
;; NOTE: Using `with-temp-buffer' is a hack to work around the fact that `make-local-variable'
Expand Down Expand Up @@ -348,7 +348,8 @@ this (must be a single line in the Org buffer):
(org-element-property (intern (concat ":" (upcase property))) element)))))
(elements (org-ql-query :from (current-buffer)
:where query
:select '(org-element-headline-parser (line-end-position))
:select '(org-ql-view--resolve-element-properties
(org-element-headline-parser (line-end-position)))
:order-by sort)))
(when take
(setf elements (cl-etypecase take
Expand Down
8 changes: 4 additions & 4 deletions org-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,9 @@ This list should not contain any duplicates."))
(defvar org-ql-regexp-part-ts-date
(rx (repeat 4 digit) "-" (repeat 2 digit) "-" (repeat 2 digit)
;; Day of week
(optional " " (1+ alpha)))
(optional " " (1+ (or alpha punct))))
"Matches the inner, date part of an Org timestamp, both active and inactive.
Also matches optional day-of-week. Used to build other timestamp
regexps.")
Used to build other timestamp regexps.")

(defvar org-ql-regexp-part-ts-repeaters
;; Repeaters (not sure if the colon is necessary, but it's in the org.el one)
Expand All @@ -170,7 +169,8 @@ regexps.")
Includes leading space character.")

(defvar org-ql-regexp-part-ts-time
(rx " " (repeat 1 2 digit) ":" (repeat 2 digit))
(rx " " (repeat 1 2 digit) ":" (repeat 2 digit)
(optional "-" (repeat 1 2 digit) ":" (repeat 2 digit)))
"Matches the inner, time part of an Org timestamp (i.e. HH:MM).
Includes leading space character. Used to build other timestamp
regexps.")
Expand Down
Loading

0 comments on commit f24d93f

Please sign in to comment.