[Timeline] Fix position of new clock line after conflict resolution

This commit is contained in:
Daniel - 2019-02-17 10:01:34 +01:00
parent b8264a0c15
commit c3f45574f0
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 10 additions and 5 deletions

View File

@ -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 ()