Selaa lähdekoodia

Merge branch 'maint'

Nicolas Goaziou 4 vuotta sitten
vanhempi
commit
6f1ea80bbd
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      lisp/org-agenda.el

+ 5 - 4
lisp/org-agenda.el

@@ -6739,9 +6739,6 @@ 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
@@ -6755,7 +6752,11 @@ 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)))))
+			      (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))))
 
 	(when (string-match org-tag-group-re txt)
 	  ;; Tags are in the string