소스 검색

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 년 전
부모
커밋
acfd6ff3bc
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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