Browse Source

org-capture: Fix "org-capture: Fix %^T and %^U placeholders"

* lisp/org-capture.el (org-capture-fill-template): Fix
  2ff3101c0e555627421162a759c4342f0b923a34.
Nicolas Goaziou 4 months ago
parent
commit
51b431d013
1 changed files with 7 additions and 11 deletions
  1. 7 11
      lisp/org-capture.el

+ 7 - 11
lisp/org-capture.el

@@ -1754,17 +1754,13 @@ The template may still contain \"%?\" for cursor positioning."
 		    ((or "t" "T" "u" "U")
 		     ;; These are the date/time related ones.
 		     (let* ((upcase? (equal (upcase key) key))
-			    (org-time-was-given upcase?)
-			    (org-end-time-was-given)
-			    (time
-			     (org-read-date
-			      upcase? t nil prompt nil
-			      (pcase key
-				("t" v-t) ("T" v-T) ("u" v-u) ("U" v-U)))))
-		       (org-insert-time-stamp
-			time org-time-was-given
-			(member key '("u" "U"))
-			nil nil (list org-end-time-was-given))))
+			    (org-end-time-was-given nil)
+			    (time (org-read-date upcase? t nil prompt)))
+		       (let ((org-time-was-given upcase?))
+			 (org-insert-time-stamp
+			  time org-time-was-given
+			  (member key '("u" "U"))
+			  nil nil (list org-end-time-was-given)))))
 		    (`nil
 		     (push (org-completing-read
 			    (concat (or prompt "Enter string")