[Timeline] Fix position of new clock line after conflict resolution
This commit is contained in:
parent
b8264a0c15
commit
c3f45574f0
|
@ -678,11 +678,16 @@ not given, update clock lines in the buffer of TARGET-MARKER."
|
||||||
(let ((new-start (float-time start))
|
(let ((new-start (float-time start))
|
||||||
(new-end (float-time end))
|
(new-end (float-time end))
|
||||||
(org-buffers (if buffers buffers (list (marker-buffer target-marker)))))
|
(org-buffers (if buffers buffers (list (marker-buffer target-marker)))))
|
||||||
(org-with-point-at target-marker
|
(let ((clock-line (apply #'timeline-tools-clockline-no-conflict
|
||||||
(org-clock-find-position nil)
|
new-start new-end org-buffers)))
|
||||||
(open-line 1)
|
(org-with-point-at target-marker
|
||||||
(insert (apply #'timeline-tools-clockline-no-conflict
|
(org-clock-find-position t)
|
||||||
new-start new-end org-buffers)))))
|
;; if there is an unclosed clock line, add new clock line after it
|
||||||
|
(when (and (looking-at "^CLOCK:")
|
||||||
|
(not (looking-at ".* => ")))
|
||||||
|
(forward-line 1))
|
||||||
|
(open-line 1)
|
||||||
|
(insert clock-line)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun timeline-tools-clockline-no-org-agenda-conflicts ()
|
(defun timeline-tools-clockline-no-org-agenda-conflicts ()
|
||||||
|
|
Loading…
Reference in New Issue