Transform timeline even when extracting it from the buffer

This reenables automatic gap filling in case it has been configure with
`timeline-tools-filter-functions', but somehow breaks undo of killing in the
timeline buffer.  The problem seems to be that undoing a kill only restores the
killed line, but not the original line entries of the lines right before and
after the lined that had been killed.  In this way, the timeline of the buffer
has overlapping entries, resulting in odd behavior.

The problem is not quite understood yet, but it seems to be that undo does not
notice the changes to the surrounding lines (maybe because they have not been
done by text editing functions).
This commit is contained in:
Daniel - 2020-01-26 21:01:13 +01:00
parent caea47fc5f
commit 8d9bdc39de
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 4 additions and 4 deletions

View File

@ -464,13 +464,13 @@ current values of the relevant buffer local variables."
(interactive)
(if (not (eq major-mode 'timeline-tools-mode))
(user-error "Not in Timeline buffer")
(let ((timeline (if force
(timeline-tools-transform-timeline
(let ((timeline (timeline-tools-transform-timeline
(if force
(timeline-tools-timeline
timeline-tools--current-time-start
timeline-tools--current-time-end
timeline-tools--current-files))
(timeline-tools--get-timeline-from-buffer))))
timeline-tools--current-files)
(timeline-tools--get-timeline-from-buffer)))))
(erase-buffer)
(insert (format "* Timeline from [%s] to [%s]\n\n"
(format-time-string timeline-tools-headline-time-format