emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-modern c32dd29318 37/65: timestamps: Add support fo


From: ELPA Syncer
Subject: [elpa] externals/org-modern c32dd29318 37/65: timestamps: Add support for repeaters
Date: Mon, 7 Mar 2022 12:57:47 -0500 (EST)

branch: externals/org-modern
commit c32dd29318305a692154133ce342ad94fd2bd5d2
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    timestamps: Add support for repeaters
---
 example.org   |  2 +-
 org-modern.el | 15 +++++++--------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/example.org b/example.org
index 8eb54fe27e..410e5a9bbf 100644
--- a/example.org
+++ b/example.org
@@ -27,7 +27,7 @@ DEADLINE:  <2022-03-01 Tue>
 SCHEDULED: <2022-02-25 10:00>
 RANGE:     [2022-03-01]--[2022-04-01]
 TIMESTAMP: [2022-02-21 Mon 13:00]
-
+REPEATED:  <2022-02-26 Sat .+1d>
 
 * Blocks
 
diff --git a/org-modern.el b/org-modern.el
index d9d2df39cc..bc83c0a1bb 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -319,15 +319,14 @@ Set to nil to disable the indicator."
     ;; year-month-day
     (put-text-property
      (match-beginning 0)
-     (if (match-end 2) (match-end 1) (match-end 0))
+     (if (eq (match-beginning 2) (match-end 2)) (match-end 0) (match-end 1))
      'face date-face)
-    (when (match-end 2)
-      ;; hour:minute
+    ;; hour:minute
+    (unless (eq (match-beginning 2) (match-end 2))
       (put-text-property
-       (match-beginning 2)
-       (1+ (match-beginning 2))
-       'display (format #(" %c" 1 3 (cursor t))
-                        (char-after (match-beginning 2))))
+       (1- (match-end 1))
+       (match-end 1)
+       'display (format "%c " (char-before (match-end 1))))
       (put-text-property
        (match-beginning 2)
        (match-end 0)
@@ -455,7 +454,7 @@ Set to nil to disable the indicator."
       (when org-modern-tag
         '(("^\\*+.*?\\( \\)\\(:.*:\\)[ \t]*$" (0 (org-modern--tag)))))
       (when org-modern-timestamp
-        '(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
[A-Za-z]+\\)? ?\\)\\([0-9]\\{2\\}:[0-9]\\{2\\}\\)?\\(?:>\\|\\]\\)"
+        '(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?: 
[A-Za-z]+\\)?\\)\\(\\(?: [0-9]\\{2\\}:[0-9]\\{2\\}\\)?\\(?: 
[.+-]+[0-9]+[hdwmy]\\)?\\)\\(?:>\\|\\]\\)"
            (0 (org-modern--timestamp)))))
       (when org-modern-statistics
         '((" \\[\\(\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\)\\]" (0 
(org-modern--statistics)))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]