[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-contrib 223390ea2c: Use format function for timestamp;
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-contrib 223390ea2c: Use format function for timestamp; combine both time-stamp-format fixes |
Date: |
Sat, 17 Dec 2022 11:59:14 -0500 (EST) |
branch: elpa/org-contrib
commit 223390ea2c2f728ca4bfd1c4a33cac25d003693a
Author: Marcel van der Boom <marcel@hsdev.com>
Commit: Bastien Guerry <bzg@gnu.org>
Use format function for timestamp; combine both time-stamp-format fixes
A redo of
https://git.sr.ht/~mrvdb/org-contrib/commit/0927d5f319d6168b0df3a118f2269535a15557ef
taking the change from
https://git.sr.ht/~bzg/org-contrib/commit/b6712e688b3a54c54b80ab34525d4672ff2a8d7a
into account
---
lisp/org-expiry.el | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/lisp/org-expiry.el b/lisp/org-expiry.el
index c3dad28a1e..45bfb71191 100644
--- a/lisp/org-expiry.el
+++ b/lisp/org-expiry.el
@@ -302,16 +302,13 @@ update the date."
(setq d-hour (format-time-string "%H:%M" d-time))
(setq timestr
;; two C-u prefixes will call org-read-date
- (concat "<"
- (if (equal arg '(16))
- (org-read-date nil nil nil nil d-time d-hour)
- (format-time-string
- (replace-regexp-in-string "\\(^<\\|>$\\)" ""
- (cdr org-time-stamp-formats))))
- ">"))
- ;; maybe transform to inactive timestamp
- (if org-expiry-inactive-timestamps
- (setq timestr (concat "[" (substring timestr 1 -1) "]")))
+ (org-expiry-format-timestamp
+ (if (equal arg '(16))
+ (org-read-date nil nil nil nil d-time d-hour)
+ (format-time-string
+ (replace-regexp-in-string "\\(^<\\|>$\\)" ""
+ (cdr org-time-stamp-formats))))
+ org-expiry-inactive-timestamps))
(save-excursion
(org-entry-put
(point) org-expiry-created-property-name timestr)))))
@@ -326,13 +323,13 @@ and insert today's date."
(setq d-time (if d (org-time-string-to-time d)
(current-time)))
(setq d-hour (format-time-string "%H:%M" d-time))
- (setq timestr (concat "<"
- (if today
- (format-time-string
- (replace-regexp-in-string "\\(^<\\|>$\\)" ""
- (cdr org-time-stamp-formats)))
- (org-read-date nil nil nil nil d-time d-hour))
- ">"))
+ (setq timestr (org-expiry-format-timestamp
+ (if today
+ (format-time-string
+ (replace-regexp-in-string "\\(^<\\|>$\\)" ""
+ (cdr
org-time-stamp-formats)))
+ (org-read-date nil nil nil nil d-time d-hour))
+ org-expiry-inactive-timestamps))
;; maybe transform to inactive timestamp
(if org-expiry-inactive-timestamps
(setq timestr (concat "[" (substring timestr 1 -1) "]")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/org-contrib 223390ea2c: Use format function for timestamp; combine both time-stamp-format fixes,
ELPA Syncer <=