[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern 5c46042666 36/65: Simplify org-modern--times
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern 5c46042666 36/65: Simplify org-modern--timestamp |
Date: |
Mon, 7 Mar 2022 12:57:47 -0500 (EST) |
branch: externals/org-modern
commit 5c46042666dc0de292c2bdf2301dbbfcc0f23d20
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Simplify org-modern--timestamp
---
org-modern.el | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index 4112d4174b..d9d2df39cc 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -316,35 +316,20 @@ Set to nil to disable the indicator."
(1- (match-end 0))
(match-end 0)
'display " ")
- ;; year
+ ;; year-month-day
(put-text-property
(match-beginning 0)
- (match-end 1)
+ (if (match-end 2) (match-end 1) (match-end 0))
'face date-face)
- ;; month
- (put-text-property
- (match-beginning 2)
- (match-end 2)
- 'face date-face)
- ;; day
- (put-text-property
- (match-beginning 3)
- (if (match-end 4) (match-end 3) (match-end 0))
- 'face date-face)
- (when (match-end 4)
+ (when (match-end 2)
+ ;; hour:minute
(put-text-property
- (match-beginning 4)
- (1+ (match-beginning 4))
+ (match-beginning 2)
+ (1+ (match-beginning 2))
'display (format #(" %c" 1 3 (cursor t))
- (char-after (match-beginning 4))))
- ;; hour
- (put-text-property
- (match-beginning 4)
- (match-end 4)
- 'face time-face)
- ;; minute
+ (char-after (match-beginning 2))))
(put-text-property
- (match-beginning 5)
+ (match-beginning 2)
(match-end 0)
'face time-face))))
@@ -470,7 +455,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 (org-modern--timestamp)))))
(when org-modern-statistics
'((" \\[\\(\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\)\\]" (0
(org-modern--statistics)))))))
- [elpa] externals/org-modern 5278d9787c 01/65: Initial commit, (continued)
- [elpa] externals/org-modern 5278d9787c 01/65: Initial commit, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 8c4bc6a320 12/65: Ensure that todo keywords stay editable (See #2), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 664f57ae12 10/65: Add option org-modern-hide-stars, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 1f0db02412 17/65: README reorganization, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern dbbb6c297c 18/65: Add license, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 7a245a435d 24/65: Update example, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 9510fa1550 25/65: Update example, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 34b36df5b7 30/65: Use two different space objects, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 00d7fd7324 33/65: Add range example, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 787e69884e 35/65: Fix regexp search for end of block, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 5c46042666 36/65: Simplify org-modern--timestamp,
ELPA Syncer <=
- [elpa] externals/org-modern c32dd29318 37/65: timestamps: Add support for repeaters, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern dd7d45878f 41/65: Do not add fringes to blocks when org-indent-mode is enabled (See #7), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern fdb7b59682 39/65: README: Package is available on MELPA, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 18787dfa38 44/65: Improve date regexp, recognize international dates (Fix #8), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 6fc453d10b 45/65: Recognize time stamps with duration (Fix #9), ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern f57b733806 48/65: Do not use invisible text properties, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 718bd89e2f 43/65: Use en-dash for checkbox composed character, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 074b7e5b51 49/65: README updates, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 9974bcb675 52/65: Typo README, ELPA Syncer, 2022/03/07
- [elpa] externals/org-modern 91e113ff4f 51/65: Revert "Do not use invisible text properties" (Fix #16), ELPA Syncer, 2022/03/07