I haven't really used `company` in the recent past, so removing this
package does not hurt much. Maybe `corfu` will be more practical for
me, as it also only relies on builtin in-buffer completion and does not
require additional magic. However, I usually do not use popup
completion dialogs much, because I find them obstructive.
`projectile` is nice, but I rarely use a fraction of its functionality
and not having to use an external package for project management feels
more robust.
Seeing active minor modes directly might be informative. Try to reduce
the list of shown minor modes to only interesting ones using the (still
existing) diminish configuration. Remove now obsolete configuration of
the minions package.
`globel-company-mode` has not been used since quite some time, and
completion in the individual programming modes should be handeled by
LSP. Disabling `company-mode` also allows to use standard completion
features, which is nice.
This is to ease the configuration, as eglot is built in. lsp-mode might
provide a better programming experience, but I do not do much Python
programming nowadays.
I tend to remove “Template” anyway when it's the only block inserted as
checklist, so let's do this automatically.
This commit also includes a minor refactoring of moving around variable
declarations to be closer to the code that actually uses them.
Previously, the last day added had been removed on the assumption that
it was the frist day after `end-date` (after which the while loop
aborts). However, when this last day is filtered because of
`:skip-matches`, this would result in accidentally removing a valid day
from the overview time period. This has been fixed by checking for this
very case, and keeping the last day added in case it is still within the
requested time period.
This is another try to reduce the number of Org items that are unfolded
when jumping to the current clock. This is particularly important with
periodic items with many subtasks, because unfolding all siblings might
be irritating (at least to me).
Just learned about `use-short-answers` (from a comment [here][]).
However, when long answers are expected for confirmation, it's often an
indication that the question at hand might be serious enough to take the
time to type these out (as recommended by the docstring of
`use-short-answers`).
[here]: http://irreal.org/blog/?p=12595
This reverts 05bb198.
Turns out this call is not that redundant after all. Revealing should
be done after jumping to the next checkbox of the current item.
However, revealing the item at point only then leads to funny
flickering, so let's keep the old implementation for now and reveal
stuff twice.
When I copy over the timeline into the actual time sheet application, I
like to focus on the first line of the remaining report, moving it to
the top of the window. Having the clocktime summary on top this hard,
because after redrawing, the summary will be on top and not the actual
timeline. Changing the positions may help here.
The values persisted here seem to be irrelevant across Emacs
installations, so there is no need to track those. It also does not
seem to officially customize the location that persist.el uses for
persisting variables: the variable that stores the directory path is
called `persist--directory-location`, indicating a private variable.
Pandoc supports grid tables, which are supported in Emacs via `table.el`.
By default, the alignment markers for those tables (:) are not
recognized in table.el, so let's add those. Furthermore, editing grid
tables in `markdown-mode` does not work, since `jit-lock-mode`
overwrites the `keymap` text property that `table.el` relies on to
enable table editing. Using `edit-indirect` to edit those tables in an
indirect buffer where everything works nicely. Indeed, editing
`table.el` tables in Org also uses an indirect buffer, for the exact
same reason.
This change is an experimental, as quite a bit of code had to be
touched. Further testing and bug hunting will be necessary.
Workload overview reports now only allow increments of one day
(`+1d`), since the current implementation cannot accomodate for arbitray
time ranges anymore (my fault, sorry). Also, the default start time for
workload overview reports has been changed to 23:59 on the previous
day (`"-1d 23:59"`) to include the current day in the report. The
rational behind this is that since the remaining work hours of today are
now included in the computation for the report, showing the entry for
today will show an accurate estimation of the remaining work time in
contrast to a constant value.
There are now additional parameters named `:work-hours` and
`:work-items-match` that specify how much work time is available on a
day and which Org items are considered work, respectively.
`:work-hours` can also take a function to compute for a given date how
much time can be spent on work. An example could be something like
this:
```emacs-lisp
(defun db/get-worktime-for-date (date)
"Return planned working time for DATE."
;; This is a simplification, as `date' might be the start of the day or the end.
(cond
((string-match-p "Sa" date) "6:00")
((string-match-p "So\\|Sun" date) "4:00")
((string-match-p "Wed\\|Mi" date) "3:00")
(t "2:00")))
```
An example report is then the following:
```
| End Time | Planned Work | Work Hours | Utilization |
| <r> | <r> | <r> | <r> |
|------------------------+--------------+------------+-------------|
| [2024-10-06 Sun 23:59] | 1:00 | 1:00 | *100.00%* |
| [2024-10-07 Mon 23:59] | 4:15 | 3:00 | *141.67%* |
| [2024-10-08 Tue 23:59] | 7:00 | 5:00 | *140.00%* |
| [2024-10-09 Wed 23:59] | 9:15 | 8:00 | *115.62%* |
| [2024-10-10 Thu 23:59] | 12:30 | 10:00 | *125.00%* |
| [2024-10-11 Fri 23:59] | 13:15 | 12:00 | *110.42%* |
| [2024-10-12 Sat 23:59] | 19:30 | 18:00 | *108.33%* |
| [2024-10-13 Sun 23:59] | 1d 1:30 | 22:00 | *115.91%* |
| [2024-10-14 Mon 23:59] | 1d 1:45 | 1d 0:00 | *107.29%* |
| [2024-10-15 Tue 23:59] | 1d 2:30 | 1d 2:00 | *101.92%* |
|------------------------+--------------+------------+-------------|
```