Browse Source

org.el (org-deadline, org-schedule): Fix bug

* org.el (org-deadline, org-schedule): Fix bug: allow to
update scheduled/deadline information anywhere in the subtree.
Bastien Guerry 4 years ago
parent
commit
6a577a2b5a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -12960,6 +12960,7 @@ can either be an Org date like \"2011-07-24\" or a delta like \"+2d\"."
 	(message "Item no longer has a deadline."))
        ((equal arg '(16))
 	(save-excursion
+	  (org-back-to-heading t)
 	  (if (re-search-forward
 	       org-deadline-time-regexp
 	       (save-excursion (outline-next-heading) (point)) t)
@@ -13030,6 +13031,7 @@ either be an Org date like \"2011-07-24\" or a delta like \"+2d\"."
 	  (message "Item is no longer scheduled.")))
        ((equal arg '(16))
 	(save-excursion
+	  (org-back-to-heading t)
 	  (if (re-search-forward
 	       org-scheduled-time-regexp
 	       (save-excursion (outline-next-heading) (point)) t)