Commit Graph

2452 Commits

Author SHA1 Message Date
ff868b57b4
Do not use short answers for confirmations
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
2024-11-24 12:01:13 +01:00
8521d627b4
Add convenience function to retrieve auth-source entries
Again inspired by https://magnus.therning.org/2024-09-01-improving-how-i-handle-secrets-in-my-work-notes.html.
2024-11-16 17:17:19 +01:00
5a25d5d069
Revoke special password implementation for SQL Org source blocks
Turns out this can be done by a simple function call, as demonstrated by
https://magnus.therning.org/2024-09-01-improving-how-i-handle-secrets-in-my-work-notes.html.
So we just extend `org-password-manager-get-password-by-id` accordingly
and use that instead.  No need to patch the default implementation of
Org!
2024-11-16 12:30:20 +01:00
3d38510284
Readd duplicate call to org-fold-reveal
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.
2024-11-16 09:33:42 +01:00
43fa4097df
Check availability of major-mode-remap-alist before setting it
This is to restore some Emacs 28 backwards compatibility.
2024-11-13 17:04:52 +01:00
05bb198e08
Remove duplicate call to org-reveal 2024-11-12 16:31:45 +01:00
aabcfcad06
Make actual timeline appear first in main display
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.
2024-11-08 21:15:23 +01:00
fe5d236b77
Ensure that Org QL is installed
This is needed by my Org mode configuration.
2024-11-01 21:31:15 +01:00
4120de7619
Do not explicitly install git-commit.el any longer
It now comes directly with magit.
2024-11-01 21:11:53 +01:00
99a938cad3
Let Git ignore persistent variables
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.
2024-11-01 18:19:12 +01:00
c6e359546d
Do not show complete item when jumping to it
This should avoid “visibility jumps” when jumping to a currently clocked
in item that is already revealed.
2024-11-01 18:13:03 +01:00
8a3bba0afe
Sort category overview in timeline tools by total amount
Nice to read, I think.
2024-10-25 19:16:25 +02:00
2c0f2f2ab5
Include overview of booked categories in timeline tools report
This is to easy booking entries that should be distributed among other
topics done in the same time range.
2024-10-25 19:10:41 +02:00
cffe713fa9
Include day of week in daily timeline tool report
This way, it's easier to see at glance what day the current report is
for.
2024-10-25 18:55:38 +02:00
986ae68730
Fix some checkdoc warnings in customization settings 2024-10-20 19:12:02 +02:00
0f43b7303f
Add custom function to start ement.el without prompts
Inspired by https://github.com/alphapapa/ement.el/issues/32#issuecomment-902539093.
2024-10-20 19:11:19 +02:00
441db75ae2
Do not evaluate Org source blocks with text modes by default
Nothing to evaluate here either.
2024-10-12 20:40:22 +02:00
78924c841e
Add first draft function to compute time at home for given date
This is supposed to be used with `db/org-workload-overview-report`.
2024-10-12 17:08:23 +02:00
2713fe1fd0
Disable Org source block evaluation for some text modes
Let's avoid the “No org-babel-execute function for foo!” errors for
those modes!
2024-10-11 20:00:34 +02:00
212c3664ff
Enhance table.el editing in markdown-mode
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.
2024-10-09 20:37:23 +02:00
a67e64a906
Include computation of already spent work time in overview report
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%* |
|------------------------+--------------+------------+-------------|
```
2024-10-06 15:31:04 +02:00
344dde2821
Fix divison by zero in workload overview report
When today's work hours are used up, show some sensible value instead of “-nan%”.
2024-10-06 11:48:48 +02:00
fa6bd0e713
Introduce first draft to compute time spent on work today
This is supposed to be used later on in workload overview reports, to
make the display of the current day account for already spent time.
2024-10-05 14:26:07 +02:00
9e3fe2a3b0
Allow to specify available work hours using custom functions
This allows to specify variable work hours depending on the
corresponding date.
2024-10-03 18:01:02 +02:00
d63cba9756
Use more speaking name for skip date function in workload report 2024-10-03 17:47:38 +02:00
62d4f62af4
Fix wrong usage of pcase 2024-10-03 17:46:59 +02:00
bdfcc61dd2
Refactor and simplify work hour computation in overview report
This is to prepare a generalization of how to specify work hours, namly
using a function from date to available work hours on that day.
2024-10-03 17:40:46 +02:00
9d03f2d953
Show available work hours in overview report to easy comparison
This is also helpful to plausibilize the shown entries, e.g. checking
whether holidays were accidentally included.
2024-10-03 17:30:56 +02:00
e9627e69fd
Mark entries with high utilization in workload overview report
That makes spotting over-utilization easier.
2024-10-03 10:32:42 +02:00
ca1b3613f9
Add simple computation of utilization to workload overview report
This way, it should be easier to spot days where utilzation is too high
to take any more work.
2024-10-03 10:32:29 +02:00
f948f3dca3
Make skip-matches also skip computations in workload overview report
This avoids unnecessary computations.
2024-10-03 09:54:15 +02:00
46797626e3
Add variable heights to Markdown headlines
Factors are the same as for Org headlines.
2024-09-20 16:29:29 +02:00
d0b126ec54
Add missing id: prefix when adding DATE references to checklists
Forgot this, oops.
2024-09-19 15:47:47 +02:00
bc4e163ac5
Include TOCs in Markdown exports by default
I usually want those.  This setting can be overwritten by
customizations.
2024-09-19 15:46:02 +02:00
f54c39fe52
Natively fontify code blocks in Markdown files
Nice!
2024-09-19 15:45:45 +02:00
dbda1928ce
Catch errors on user clock choice to ensure continuous clocking 2024-09-15 13:09:12 +02:00
38ed7dee62
Pin markdown-mode to stable versions
I need this to work, and not necessarily the latest features.
2024-09-10 18:19:43 +02:00
29792b736c
Replace backwards search in minibuffer with history completion
I keep hitting C-r where I should be using M-r instead.  Let's make my
life a little bit easier and make C-r behave like M-r.
2024-08-31 22:21:19 +02:00
75b54128bd
Ignore SOMEWHEN items in checklist backlinks
Since these are deferred items, they don't have to show up in checklists.
2024-08-25 09:07:46 +02:00
d01b3bdc09
Add clocktable formatter to filter entries with small clocking time
Whenever I try to check what I actually in the past couple of days, I
try to use a clocktable for this.  However, those clocktables are
usually littered with small entries, i.e. entries where I only spent a
couple of minutes on (example: a quick chat with a colleague).  Those
entries clutter the view for the relevant entries, making it hard to
make sense of past activities.

Restricting the clocktable to a certain depth somehow helps, but major
single tasks are hidden this way, and I usually want to see those.

The custom formatter added in this commit tries to alleviate this
situation by providing a mechanism to filter out those entries using a
minimum clocktime threshold.  Let's see how this feature plays out.
2024-08-17 16:07:17 +02:00
3ccb13ce53
Do not display output of async shell commands by default anymore
Moving this output to the bottom of the frame did not help; it's just
something I do not want to see by default.
2024-08-17 09:01:10 +02:00
c17852bd90
Add Org link handler for custom CVE links
I have to deal with those quite a bit, it's nice to have a handler to
easier find the description for these numbers.
2024-08-16 18:05:34 +02:00
7ea1a31a25
Use consult for default history completion 2024-08-14 20:21:57 +02:00
306995032e
Rework temporary workaround for links with ending closing brackets
Previously, links which end in a closing brackets got a non-breaking
space appended via a separate advice to `org-link-make-string`.
However, this did not work well with the other advice that removes
statistics cookies from links, mostly because I messed up the order in
which the advices were applied.  To remedy this, the advice to remove
statistics cookies now also adds a non-breaking spaces as described
above.
2024-08-08 17:03:07 +02:00
40bafe78ce
Add temporary fix for Org alignment of links to headlines
When a headline ends on a closing bracket, Org adds an escape character
to the link text to distinguish the end of the link from the link
description.  This escape character is a zero-width space, which is
counted for Org table alignment as one character, but the link itself is
displayed shorter, because the zero-width character is displayed as a
single pixel by emacs.

To work around this issue until the upstream fix is released, let's add
a final non-breaking space to those link descriptions to avoid the need
for the zero-width escape characters.
2024-08-05 17:45:10 +02:00
726f1baf8c
Show async shell command output in bottom side window
I found that opening this output on the right side to be annoying, so
let's switch try the bottom side window instead.  This also works with
having an eshell buffer open at the same time, resulting in a nice reuse
of the right space of eshell windows that is usually empty.
2024-08-03 12:12:44 +02:00
33b7d5d8d3
Allow to skip entries in workload-overview-reports
This is especially useful when skipping weekends, but also allows for
future extensions where based on the date more complex skipping criteria
can be implemented, e.g. for holidays or vacations.
2024-08-02 18:42:59 +02:00
1ef71f02b8
Warn of missing customization for grep.el on Windows 2024-07-28 16:18:16 +02:00
b350c4f618
Use absolute path for Zettelkasten directories
`rg` does not recognize `~`.
2024-07-28 16:01:56 +02:00
98f31c6c2e
Restrict Things-On-Hold agenda to explicitly tagged items
It's not helpful to show subitems of HOLD items, this only makes this
agenda view unnecessarily long and thus harder to maintain.
2024-07-26 19:31:46 +02:00