Ver código fonte

Fix bug in org-capture file+datetree+promt target type

* lisp/org-capture.el (org-capture-set-target-location): Set the capture
default time also to the prompt time.

In the file+datetree+promt target type, the user is being asked for a
date, where to file an entry.  In the template, there can the escape
placeholders for active and inactive time stamps.  So far, these were
filled with todays date.  This patch changes this behavior, so that
also at %t and %u escaped, the date entered at the prompt will be
used.

Reported by Erik Hetzner.
Carsten Dominik 13 anos atrás
pai
commit
acfd6ff3bc
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      lisp/org-capture.el

+ 2 - 1
lisp/org-capture.el

@@ -778,7 +778,8 @@ already gone.  Any prefix argument will be passed to the refile command."
 	    (let ((prompt-time (org-read-date
 				nil t nil "Date for tree entry:"
 				(current-time))))
-	      (org-capture-put :prompt-time prompt-time)
+	      (org-capture-put :prompt-time prompt-time
+			       :default-time prompt-time)
 	      (time-to-days prompt-time)))
 	   (t
 	    ;; current date, possible corrected for late night workers