summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-12-06 09:00:27 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2011-12-06 09:00:27 +0100
commitacfd6ff3bc16b02760588a3954f4c47a152db1c1 (patch)
treeda4528ffd2cbbc3560b38519d44df78386b0a3b2
parent7e49b85c56bc5c71bc44dde2f62a9931698184f9 (diff)
downloadorg-mode-acfd6ff3.tar.gz
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.
-rw-r--r--lisp/org-capture.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 92f2b81..566fb96 100644
--- a/lisp/org-capture.el
+++ b/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