branch: externals-release/org commit 6107c2b15bf19ab5300c2861db365a3dc310adc6 Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> Commit: Nicolas Goaziou <m...@nicolasgoaziou.fr>
Revert "agenda: Fix "org-duration-to-minutes: Invalid duration format" error" This reverts commit bc857bfc62ba94e04fb338bfb35f4b612c114d0c. The "fix" breaks elsewhere, as reported below. Reported-by: Daniel Ortmann <daniel.ortm...@oracle.com> <http://lists.gnu.org/r/emacs-orgmode/2021-05/msg00592.html> --- lisp/org-agenda.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f215b55..b91bf3a 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6656,6 +6656,9 @@ Any match of REMOVE-RE will be removed from TXT." (= (match-beginning 0) 0) t)) (setq txt (replace-match "" nil nil txt)))) + ;; Normalize the time(s) to 24 hour + (when s1 (setq s1 (org-get-time-of-day s1 'string t))) + (when s2 (setq s2 (org-get-time-of-day s2 'string t))) ;; Try to set s2 if s1 and ;; `org-agenda-default-appointment-duration' are set @@ -6669,11 +6672,7 @@ Any match of REMOVE-RE will be removed from TXT." ;; Compute the duration (when s2 (setq duration (- (org-duration-to-minutes s2) - (org-duration-to-minutes s1)))) - - ;; Normalize the time(s) to 24 hour - (when s1 (setq s1 (org-get-time-of-day s1 'string t))) - (when s2 (setq s2 (org-get-time-of-day s2 'string t)))) + (org-duration-to-minutes s1))))) (when (string-match org-tag-group-re txt) ;; Tags are in the string