From 442e80dc9597617b1a29271d998792c371f3d42a Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 19 Nov 2022 12:14:00 +0100 Subject: lisp/ob-asymptote.el: Replace Luc P. by Jarmo H. as maintainer --- lisp/ob-asymptote.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index 6df51d0..55811bd 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2009-2021 Free Software Foundation, Inc. ;; Author: Eric Schulte -;; Maintainer: Luc Pellissier +;; Maintainer: Jarmo Hurri ;; Keywords: literate programming, reproducible research ;; Homepage: https://git.sr.ht/~bzg/org-contrib -- cgit v1.2.3 From 0927d5f319d6168b0df3a118f2269535a15557ef Mon Sep 17 00:00:00 2001 From: Marcel van der Boom Date: Wed, 7 Dec 2022 13:01:29 +0100 Subject: Fix formatting of inserted timestamps Make handling the timestamps internally consistent, i.e. without the delimiters and use a dedicated helper to format them based on the value of the `org-expiry-inactive-timestamps variable. --- lisp/org-expiry.el | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lisp/org-expiry.el b/lisp/org-expiry.el index 98ad58a..b359610 100644 --- a/lisp/org-expiry.el +++ b/lisp/org-expiry.el @@ -282,6 +282,9 @@ The expiry process will run the function defined by processed expired)))))) ;;; Insert created/expiry property: +(defun org-expiry-format-timestamp (timestr inactive) + "Properly format TIMESTR into an org (in)active timestamp" + (format (if inactive "[%s]" "<%s>") timestr)) (defun org-expiry-insert-created (&optional arg) "Insert or update a property with the creation date. @@ -298,14 +301,12 @@ update the date." (current-time))) (setq d-hour (format-time-string "%H:%M" d-time)) (setq timestr - ;; two C-u prefixes will call org-read-date - (if (equal arg '(16)) - (concat "<" (org-read-date - nil nil nil nil d-time d-hour) ">") - (format-time-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 + ;; two C-u prefixes will call org-read-date + (if (equal arg '(16)) + (org-read-date nil nil nil nil d-time d-hour) + (format-time-string (cdr org-time-stamp-formats))) + org-expiry-inactive-timestamps)) (save-excursion (org-entry-put (point) org-expiry-created-property-name timestr))))) @@ -320,13 +321,11 @@ 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 (if today - (format-time-string (cdr org-time-stamp-formats)) - (concat "<" (org-read-date - nil nil nil nil d-time d-hour) ">"))) - ;; maybe transform to inactive timestamp - (if org-expiry-inactive-timestamps - (setq timestr (concat "[" (substring timestr 1 -1) "]"))) + (setq timestr (org-expiry-format-timestamp + (if today + (format-time-string (cdr org-time-stamp-formats)) + (org-read-date nil nil nil nil d-time d-hour)) + org-expiry-inactive-timestamps)) (save-excursion (org-entry-put -- cgit v1.2.3 From b6712e688b3a54c54b80ab34525d4672ff2a8d7a Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Sun, 4 Dec 2022 01:02:35 -0800 Subject: lisp/org-expiry.el: Account for org-time-stamp-formats refactor * lisp/org-expiry.el (org-expiry-insert-created) (org-expiry-insert-expiry): timestamp formats dropped delimiters so a slight modification is required following org commit e3a7c01874c9bb80e04ffa58c578619faf09e7f0, the change is made backward compatible by removing < and > from the old timestamp format --- lisp/org-expiry.el | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/lisp/org-expiry.el b/lisp/org-expiry.el index b359610..c3dad28 100644 --- a/lisp/org-expiry.el +++ b/lisp/org-expiry.el @@ -301,12 +301,17 @@ update the date." (current-time))) (setq d-hour (format-time-string "%H:%M" d-time)) (setq timestr - (org-expiry-format-timestamp - ;; two C-u prefixes will call org-read-date - (if (equal arg '(16)) - (org-read-date nil nil nil nil d-time d-hour) - (format-time-string (cdr org-time-stamp-formats))) - org-expiry-inactive-timestamps)) + ;; 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) "]"))) (save-excursion (org-entry-put (point) org-expiry-created-property-name timestr))))) @@ -321,11 +326,16 @@ 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 (org-expiry-format-timestamp - (if today - (format-time-string (cdr org-time-stamp-formats)) - (org-read-date nil nil nil nil d-time d-hour)) - org-expiry-inactive-timestamps)) + (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)) + ">")) + ;; maybe transform to inactive timestamp + (if org-expiry-inactive-timestamps + (setq timestr (concat "[" (substring timestr 1 -1) "]"))) (save-excursion (org-entry-put -- cgit v1.2.3 From d0cebebb301b5de93e9c5228a91e3e4f5d41902b Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 15 Dec 2022 10:51:39 +0300 Subject: * lisp/org-contrib.el: Bump version to 0.4.1 This release is a bugfix release aiming to propagate the important bugfixes to ELPA. Link: https://orgmode.org/list/m28rjerx1t.fsf@purvis.id.au --- lisp/org-contrib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-contrib.el b/lisp/org-contrib.el index fd1398c..5eb6bfa 100644 --- a/lisp/org-contrib.el +++ b/lisp/org-contrib.el @@ -5,7 +5,7 @@ ;; Author: Bastien Guerry ;; Homepage: https://git.sr.ht/~bzg/org-contrib ;; Package-Requires: ((emacs "25.1") (org "9.4.6")) -;; Version: 0.4 +;; Version: 0.4.1 ;; Keywords: org ;; SPDX-License-Identifier: GPL-3.0-or-later -- cgit v1.2.3