branch: externals/org-modern commit 10a42c67406d01a7e4679f371e4cb2814653d814 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Handle date ranges --- example.org | 1 + org-modern.el | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example.org b/example.org index 7a57d5b043..6a9c8cdb02 100644 --- a/example.org +++ b/example.org @@ -26,6 +26,7 @@ which are styled by =org-modern=. DEADLINE: <2022-03-01 Tue> SCHEDULED: <2022-02-25 10:00> DRANGE: [2022-03-01]--[2022-04-01] +DRANGE: <2022-03-01>--<2022-04-01> TRANGE: [2022-03-01 Tue 10:42-11:00] TIMESTAMP: [2022-02-21 Mon 13:00] DREPEATED: <2022-02-26 Sat .+1d +3d> diff --git a/org-modern.el b/org-modern.el index 54afc0febb..b366ba78ef 100644 --- a/org-modern.el +++ b/org-modern.el @@ -485,7 +485,10 @@ Set to nil to disable the indicator." '(("^\\*+.*?\\( \\)\\(:.*:\\)[ \t]*$" (0 (org-modern--tag))))) (when org-modern-timestamp '(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: [[:word:]]+\\)?\\(?: [.+-]+[0-9]+[[:word:]]\\)*\\)\\(\\(?: [0-9:-]+\\)?\\(?: [.+-]+[0-9]+[[:word:]]\\)*\\)\\(?:>\\|\\]\\)" - (0 (org-modern--timestamp))))) + (0 (org-modern--timestamp))) + ("<[^>]+>\\(-\\)\\(-\\)<[^>]+>\\|\\[[^]]+\\]\\(?1:-\\)\\(?2:-\\)\\[[^]]+\\]" + (1 '(face org-modern-label display #(" " 1 2 (face (:strike-through t) cursor t))) t) + (2 '(face org-modern-label display #(" " 0 1 (face (:strike-through t)))) t)))) (when org-modern-statistics '((" \\[\\(\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\)\\]" (0 (org-modern--statistics))))))) (font-lock-add-keywords nil org-modern--keywords 'append)