Fix new time logging upon rescheduling

* lisp/org.el (org-deadline):
(org-schedule): Properly store new time so it is accessible using "%s"
in `org-log-note-headings'.

Reported-by: Malcolm Purvis <malcolm@purvis.id.au>
<http://permalink.gmane.org/gmane.emacs.orgmode/100211>
This commit is contained in:
Nicolas Goaziou 2015-08-19 16:07:22 +02:00
parent 93b73bd303
commit f4d76465be
1 changed files with 12 additions and 10 deletions

View File

@ -13342,11 +13342,12 @@ can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"."
(user-error "No deadline information to update"))))
(t
(org-add-planning-info 'deadline time 'closed)
(when (and old-date org-log-redeadline
(not (equal old-date
(substring org-last-inserted-timestamp 1 -1))))
(org-add-log-setup 'redeadline nil old-date 'findpos
org-log-redeadline))
(when (and old-date
org-log-redeadline
(not (equal old-date org-last-inserted-timestamp)))
(org-add-log-setup
'redeadline org-last-inserted-timestamp nil old-date 'findpos
org-log-redeadline))
(when repeater
(save-excursion
(org-back-to-heading t)
@ -13413,11 +13414,12 @@ either be an Org date like \"2011-07-24\" or a delta like \"+2d\"."
(user-error "No scheduled information to update"))))
(t
(org-add-planning-info 'scheduled time 'closed)
(when (and old-date org-log-reschedule
(not (equal old-date
(substring org-last-inserted-timestamp 1 -1))))
(org-add-log-setup 'reschedule nil old-date 'findpos
org-log-reschedule))
(when (and old-date
org-log-reschedule
(not (equal old-date org-last-inserted-timestamp)))
(org-add-log-setup
'reschedule org-last-inserted-timestamp nil old-date 'findpos
org-log-reschedule))
(when repeater
(save-excursion
(org-back-to-heading t)