Commit Graph

95 Commits

Author SHA1 Message Date
Daniel - b952504c81
Fix org mode category refresh when redisplaying timelines
Iterating over the current set of file names may not work when no files are
given (in which case all agenda files should be visisted).  However, instead of
fixing the set of files, it should be more robust to find all referenced buffers
by iterating over the markers of the entries.  In that case, even if a file is
visited by multiple buffers, we can be sure that the right buffers are referesh
before the timeline is redrawn.
2021-09-30 15:35:18 +02:00
Daniel - b85246ae7c
Add shortcut to timeline for deleting other windows 2021-07-03 17:54:15 +02:00
Daniel - 2e229c5af9
Explicitly define setter functions for timeline tooling
This is more explicitly and allows for more flexiblity.  Let's hope the
performance impact is not prohibitive, though.
2020-06-27 10:38:13 +02:00
Daniel - 32b424de24
Add missing require for `timeline-tools' 2020-06-26 23:02:09 +02:00
Daniel - bea691cc9b
Move timeline minor mode activation to mode definition 2020-01-26 21:08:55 +01:00
Daniel - 8d9bdc39de
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).
2020-01-26 21:01:13 +01:00
Daniel - caea47fc5f
Add standard shortcut for redrawing a timeline buffer
I keep hitting "g" so often that it has to work to not confuse me any longer.
2020-01-26 20:55:10 +01:00
Daniel - cccaf5bf4b
Move up timeline functions for moving the cursor
They are more fundamental than other functions, and should thus be closer to the
2020-01-26 20:54:34 +01:00
Daniel - 619e5bdcae
No longer store timeline of current buffer in separate variable
This does not play nicely with undo, because undo won't track changes to local
variables.  Thus, if we every want to have a working undo in timeline buffers,
the timeline needs to be saved as something textual.  Luckily, we already store
each entry of the timeline as a text property in the timeline table, and from
now on we will extract the timeline from there whenever we need it.

Undo is still not working fully yet, there are some oddities that need to be
addressed first.
2020-01-26 20:45:44 +01:00
Daniel - 85cfd25097
Delete feature to remove short entries
Haven't used it much anyway, and this will not work anymore when we no longer
explicitly store the current timeline of the buffer.
2020-01-26 20:40:36 +01:00
Daniel - be43c611d9
Introduce explicit force parameter for timeline reparsing 2020-01-26 20:16:57 +01:00
Daniel - 3f5ae63ea4
Reparse timeline when buffer-local variable is nil
This removes a lot of duplicate code.
2020-01-26 19:50:29 +01:00
Daniel - 9ab5d55237
Remove visibility cycling from general clock mapping function
It's only necessary when editing the buffer, not when only traversing it.  Moved
it to the only function where this is actually done, and added a comment to the
docstring of `timeline-tools-map-clocklines' to remind everyone that editing the
buffer through this function may yield funny surprises :)
2020-01-10 18:12:50 +01:00
Daniel - e966edd950
Use `org-show-all' to, well, show all
Using `org-cycle' may result in hooks being run, depending on where point is.
This may cause undesired and highly surprising behavior.
2020-01-10 18:10:07 +01:00
Daniel - 95555dd7c1
Add missing require for timeline-tools 2020-01-05 14:32:38 +01:00
Daniel - 76999d9136
[Timeline] Add text properties to all fields
Actually, we add the text properties ‘marker’ and ‘entry’ to the whole line, but
the alinging of the table somehow removes the text properties between two
columns.  It is kept in the fields, though, and that is enough.
2019-07-13 20:16:04 +02:00
Daniel - af244b853b
[Timeline] Don’t look from behind when killing rows
Somehow sometimes columns get added at the end, and then the old implementation
did not work correctly.
2019-07-13 19:38:26 +02:00
Daniel - 0a68df7b49
[Timeline] Fix obsolete calls to ‘timeline-tools-entry-category’ 2019-03-29 18:46:18 +01:00
Daniel - 207fb331ff
[Timeline] Allow to customize category when formatting timelines 2019-03-29 17:41:30 +01:00
Daniel - 9fa7662867
[Timeline] Extend ‘timeline-tools-timeline’ to also work on buffers 2019-02-17 13:10:13 +01:00
Daniel - fc3e66637b
[Timeline] Comment to remember reworking ‘timeline-tools-timeline’ 2019-02-17 10:06:57 +01:00
Daniel - c3f45574f0
[Timeline] Fix position of new clock line after conflict resolution 2019-02-17 10:01:34 +01:00
Daniel - 45a1141e6c
[Timeline] Fix typo 2019-02-17 09:14:07 +01:00
Daniel - 07aad33448
[Timeline] Make clock line parser barf when not in Org mode 2019-02-17 09:13:37 +01:00
Daniel - 689417a720
[Timeline] Fix correction of conflicts with currently running clock 2019-02-16 14:06:25 +01:00
Daniel - 532e2ff22a
[Timeline] Extend ‘timeline-tools-clockline-no-org-agenda-conflicts’ 2019-02-16 14:06:25 +01:00
Daniel - 016fbf3c10
[Org] Extend functionality to insert past interruptions
For this a new function ‘timeline-tools-clockline-no-org-agenda-conflicts’ as
been added that reads in a clock line (start and end times), updates all org
agenda files to fix conflicting clock lines, and returns the string of the new
clock line.  This works for all complete clock lines (i.e., those with end
times), but not for open clock lines (i.e., those missing an end timestamp).
2019-02-16 14:06:25 +01:00
Daniel - 926e977016
[Timeline] Try to keep point on deleted line 2018-11-29 20:08:33 +01:00
Daniel - 16068add6f
[Timeline] Minor note on what else to do 2018-11-28 17:06:15 +01:00
Daniel - 98f94be5f7
[Timeline] Cleaning up as suggested by flycheck 2018-11-28 16:58:13 +01:00
Daniel - c8e9c6340e
[Timeline] Make sure point is correct after killing 2018-11-28 16:52:11 +01:00
Daniel - 62ac9a887b
[Timeline] Extract gap-filling into separate function 2018-11-28 16:50:18 +01:00
Daniel - f2db1f5b5e
[Timeline] Ensure empty timelines don’t break removal of short entries 2018-11-28 16:38:47 +01:00
Daniel - a4febc68d1
[Timeline] Fix name of function 2018-11-28 16:38:36 +01:00
Daniel - f54248927d
[Timeline] Some first documentation 2018-11-28 16:38:34 +01:00
Daniel - d54079d660
[Timeline] More error checking when trying to kill a line 2018-11-28 16:17:37 +01:00
Daniel - 325ccc58ea
[Timeline] Move point on headline after redrawing 2018-11-28 16:17:20 +01:00
Daniel - 5a309b1d0f
[Timeline] Disable undo
Undoing changes in the timeline buffer may make the display inconsistent with
the values of the internal variables (in particular when lines got killed and
the like).
2018-11-28 16:16:37 +01:00
Daniel - a8385cb542
[Timeline] Dump functions to move between lines 2018-11-28 16:12:06 +01:00
Daniel - be6f75ba5c
[Timeline] Add killing of lines 2018-11-28 15:59:21 +01:00
Daniel - fd3b2135ca
[Timeline] Make transformer for timelines into separate function 2018-11-28 15:55:29 +01:00
Daniel - fc53fd8943
[Timeline] Fix return value of headline getter 2018-11-28 15:55:08 +01:00
Daniel - b9d611d9bf
[Timeline] Move propertization (uh) to redrawing function 2018-11-28 15:46:50 +01:00
Daniel - 0bfdf970d1
[Timeline] Remove obsolete clustering filter function 2018-11-28 15:45:15 +01:00
Daniel - 57a8f25ea0
[Timeline] Remove code for clustered entries
Now all entries have exactly one marker.
2018-11-28 15:44:48 +01:00
Daniel - 6ad90e02b9
[Timeline] First draft version for adding inverted clock lines 2018-11-21 17:29:29 +01:00
Daniel - d2a91b8320
[Timeline] Extend ‘timeline-tools-clocklines-of-task’ to accept point or mark 2018-11-21 17:19:32 +01:00
Daniel - 70c3fc3aee
[Timeline] Make sure buffer is unfolded before iterating over clocklines 2018-11-21 17:19:06 +01:00
Daniel - 7345824659
[Timeline] New default value for filter functions 2018-08-03 20:15:33 +02:00
Daniel - db0d3e726a
[Timeline] Allow clustering by same entry
The corresponding function shares a lot of code with the one for clustering by
same category, but for now it’s not worth the effort to refactor this.
2018-08-03 20:14:57 +02:00