diff options
author | No Wayman <iarchivedmywholelife@gmail.com> | 2020-09-08 10:27:13 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-09-08 10:27:13 +0200 |
commit | 4f49ebb6d6ebde78ccea88704fcead33bb0b59f5 (patch) | |
tree | 429e677e9d659a0bba26c55c4b49a43d8f822c6c | |
parent | 7c4b67d49aa5fbac9bdb39c5883c9faf88cd2cbf (diff) | |
download | org-mode-4f49ebb6d6ebde78ccea88704fcead33bb0b59f5.tar.gz |
org.el: Fix `org-add-planning-info'
* lisp/org.el (org-add-planning-info): * lisp/org.el
(org-add-planning-info): Use `org-time-was-given' and
`org-end-time-was-given' if the variables are bound from an
outside call.
This allows e.g. programmatically passing a time of day to
`org-schedule'.
TINYCHANGE
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index bc74ced..5a650eb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10618,7 +10618,7 @@ among `closed', `deadline', `scheduled' and nil. TIME indicates the time to use. If none is given, the user is prompted for a date. REMOVE indicates what kind of entries to remove. An old WHAT entry will also be removed." - (let (org-time-was-given org-end-time-was-given default-time default-input) + (let (default-time default-input) (when (and (memq what '(scheduled deadline)) (or (not time) (and (stringp time) @@ -10707,10 +10707,12 @@ WHAT entry will also be removed." ;; Insert associated timestamp. (let ((ts (org-insert-time-stamp time - (or org-time-was-given + (or (and (boundp 'org-time-was-given) org-time-was-given) (and (eq what 'closed) org-log-done-with-time)) (eq what 'closed) - nil nil (list org-end-time-was-given)))) + nil nil + (when (boundp 'org-end-time-was-given) + (list org-end-time-was-given))))) (unless (eolp) (insert " ")) ts))))) |