|
@@ -4891,6 +4891,16 @@ Providing it allows for quicker computation."
|
|
|
(if (and (>= origin (point)) (< origin (line-end-position)))
|
|
|
(narrow-to-region (point) (line-end-position))
|
|
|
(throw 'objects-forbidden element))))
|
|
|
+ ;; At a planning line, if point is at a timestamp, return it,
|
|
|
+ ;; otherwise, return element.
|
|
|
+ ((eq type 'planning)
|
|
|
+ (dolist (p '(:closed :deadline :scheduled))
|
|
|
+ (let ((timestamp (org-element-property p element)))
|
|
|
+ (when (and timestamp
|
|
|
+ (<= (org-element-property :begin timestamp) origin)
|
|
|
+ (> (org-element-property :end timestamp) origin))
|
|
|
+ (throw 'objects-forbidden timestamp))))
|
|
|
+ (throw 'objects-forbidden element))
|
|
|
(t (throw 'objects-forbidden element)))
|
|
|
(goto-char (point-min))
|
|
|
(let ((restriction (org-element-restriction type))
|