When using `date-picker` to update the SCHEDULED/DEADLINE timestamp by
clicking an existing one, logseq will add a new timestamp instead of
updating the old one. This patch fixs this issue.
1. `set-marker` will not log time anymore. The time logging is moved
to `with-timetracking`
2. Concat `logbook` only if `new-clocks` is nil, which fixs the
duplication of clock-in log.
This commit repicated the beautiful orgmode clock system [1]. Only
`clock-in` `clock-continue` `clock-out` are currently supported in
orgmode format. Markdown users couldn't use it since the old
logseq-system support better for markdown files. However, the new
system could be easily applied to markdown, if the community needs
this, I would like to implement it. Let me hear your voices.
The new system stores the clock log in the `LOGBOOK` drawer as orgmode
does, which is supported from the latest ver. `0.3.6` logseq. `TODO`
-> `DOING`, `LATER` -> `NOW` marker switch starts the clock on the
current block, while `DOING`->`DONE`, `NOW`->`DONE` ends the clock. If
the same marker switch got started on the same block again, a new
clock will be started, once clocked out, a total sum of working time
will be estimated and showed on the right side of headline as logseq
does now.
The advantage of the new clock is:
- It is from orgmode, and is compatible with orgmode.
- The total clock summary is calculated more accurately. Logseq now
erases the last clock if you re-clock on the same block, in no way
the total time could be calculated.
- more extensible to produce various clock report.
[1] https://orgmode.org/manual/Clocking-commands.html#Clocking-commands