Commit Graph

734 Commits

Author SHA1 Message Date
Daniel - 95920f8291
Extend default scope for `db/org-get-location` when in agenda files
When inside a file that is part of `org-agenda-file`, the default scope to
search for locations via `db/org-get-location` (used for example when
interactively inserting links) is extended to include all agenda files, and not
only the current buffer.  The idea behind this is to consider all agenda files
as one large data collection, and not only individual files.  This inhibits the
usual error, when trying to insert links at items located in refile.org, that
links are only displayed for items in refile.org itself – which are usually not
many – when instead links to items in the default org files where actually
requested.

This should not be an issue for performance, as searching through all agenda
files for valid locations is fast even on Windows.
2023-01-20 18:39:00 +01:00
Daniel - d9b0543409
Remove obsolete warning in workload overview report docstring 2023-01-16 19:21:49 +01:00
Daniel - d373976965
Fix off-by-one error in workload overview report end-date handling
Pushed one to much, so just removed it afterwards.
2023-01-16 19:20:44 +01:00
Daniel - 558bb0b1cc
Make timestamp format in workload overview report consistent
Brackets for both timestamps.
2023-01-16 19:16:04 +01:00
Daniel - bb7da2e08e
Change timestamp format in workload overview report to internal time
`org-read-date` seems to have bug that it does not consider the hh:mm part of an
input string sometimes.  Trying to work around this by using internal times
whenever possible, but it's not complete yet.
2023-01-16 19:09:04 +01:00
Daniel - 4e5cad2842
Fix off-by-one error in workload overview report
Found that the report will only produce reasonable output when always working on
00:00.  Left a note in the docstring to warn about this, should be fixed later on.
2023-01-16 17:26:32 +01:00
Daniel - d699fc8450
Add property to exclude individual Org items as checklist backlinks
Use case: do not add a workload report (which usually contains links to all
current tasks) when inserting checklist backlinks; they do not carry any
information and are thus not relevant.
2023-01-13 22:31:41 +01:00
Daniel - fc4d6b7767
Fix some identation
but not all, in particular not the one of the `cl-flet` call; see
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9622 for this.
2023-01-12 16:46:26 +01:00
Daniel - f534833520
Add caption with time for workload reports
Those reports are only relevant when known when they have been generated.

This is similar to the caption added to dynamic clocktable blocks.
2023-01-12 16:33:07 +01:00
Daniel - 2423dcf6cd
Fix start date in workload overview report to midnight
This is the expected behavior: when no start date is given, it should default to
today (the whole day), and not exactly now, so that day increments do not start
in the mid of the day, yielding misleading results.
2023-01-11 21:17:02 +01:00
Daniel - 28b2047ad6
Fix stacking of summed effort estimations upon agenda refresh
When refreshing the Org agenda without completing redrawing it (i.e, by calling
`org-agenda-filter-by-tag`), effort estimates where added for every refreshing,
causing them to stack up.  We now check whether a summed effort estimate is
already present and remove it before adding it again.

(Maybe one could also just skip the effort recalculation if the a summed effort
estimate is already present, but I am not sure whether this will cause display
inconsistencies when new events are added or old ones are deleted.)
2023-01-11 20:44:19 +01:00
Daniel - 6ed088d2da
Fix missing summation of time blocks in agenda 2023-01-11 20:22:29 +01:00
Daniel - a54ade74a4
Push links to Org items always to top of currently known links
When adding a link to an item via `org-store-link`, and the link is not known
yet, the links is always put at the beginning of the list of currently known
links, as stored in `org-stored-links`.  This allows to conveniently insert this
link via `org-insert-link` by just choosing the first element of the list, which
is selected by default.

However, when the link to the requested item is already present in
`org-stored-links`, the link is not pushed to the beginning of
`org-stored-links` by `org-store-link`, but kept where it is.  When calling
`org-insert-link` to insert a link to the item, manual selection of the correct
link is required, which is annoying and unnecessarily interrupting the current
workflow.  Even worse, when overlooking the notification that the link is
already stored, one will assume that the link to the requested item is at the
top of `org-stored-links` (which is isn't), subsequently inserting false links
when blindly calling `org-insert-link`.  (Yes, this has happend to me …)

This patch fixes this issue by ensuring that links to items (regardless whether
they have already been known or not) are always put at the front of the
`org-stored-links`.  This patch also removes the rarely used
`db/org-clear-stored-links` function, whose purpose was to provide some kind of
workaround, but turned out not to be convenient enough to actually be
used (because it also removed potentially useful links when clearing the cache).
2022-12-20 08:46:47 +01:00
Daniel - 461f212529
Simplify file pattern query for grep
The original version of `grep-read-files` includes file names in its default
values, giving an irritating completion candidate list when used with ivy.
Changed this to just let `completing-read` do the completion itself.
2022-12-15 16:29:36 +01:00
Daniel - 7c9f795a38
Add function to jump to template associated with the item at point 2022-12-15 14:16:52 +01:00
Daniel - 64bc1c762b
Jump to first open checkbox in currently clocked-in item by default
When no open checkbox is found, just jump to the headline of the item, as
before.
2022-11-19 16:09:38 +01:00
Daniel - 69f3f80a6e
Allow empty template when inserting checklists to Org item
In some cases, the backlinks may be sufficient as checklist.
2022-11-12 16:56:29 +01:00
Daniel - bba3adef3d
No not print empty backlink table when inserting checklist
In case there are not backlinks, replace the empty backlink table with a simple
"none".  I think that's cleaner :)
2022-11-12 15:46:49 +01:00
Daniel - d8c8e2b272
Do not backlinks in checklists when scheduled in the future
Items scheduled in the future are generally ignored, so let's do this in
checklists as well.
2022-11-12 11:50:53 +01:00
Daniel - 150b17c22b
Look up parent depth for backlinks in checklist via item property 2022-10-30 12:04:13 +01:00
Daniel - c9dcc7778e
Use Org builtin function to format links in strings 2022-10-29 10:17:28 +02:00
Daniel - e8fae32071
Match namespace prefix for project utilities with package name 2022-10-16 21:10:45 +02:00
Daniel - 4b4f187869
Update package comment for db-projects.el 2022-10-16 21:01:59 +02:00
Daniel - 425792a2ee
Do not create dummy directories when setting up a new project 2022-10-16 21:00:40 +02:00
Daniel - 72d6904968
Minor cosmetics in personal project utilities 2022-10-16 20:59:02 +02:00
Daniel - 7663b82800
Stop using “long names” in personal project utilities
They have only been used in project diaries, and since these are gone now, long
names should go too.
2022-10-16 20:58:11 +02:00
Daniel - 137bafeb0b
Remove bookmark management from personal project utilities
I stopped using project diaries some time ago, so let's get rid of this
functinality.
2022-10-16 20:56:28 +02:00
Daniel - 93fee67983
Remove obsolete eshell magit command
Just use `magit` directly, eshell understands this.
2022-10-13 17:22:31 +02:00
Daniel - 0c84493abc
Do not include TEMPLATE in inserted checklists
References to item at point contained in templates are usually not meant to be
considered manually, but just to automatically insert backreferences.
2022-10-09 11:36:43 +02:00
Daniel - 754e22dc77
Update function name and docstring for Org template copy function
We are now not merely copying a template from another item, but more abstractly
insert a checklist consisting of backlinks and a template.  Update docstring and
function name to reflect that, but keep the old name of `db/org-copy-template`
as an obsolete alias.
2022-10-09 11:22:36 +02:00
Daniel - 564990a1af
Automatically add backlinks when copying templates
Experimental

Backlinks are an integral part of the checklist for the item at point, so why
not include them per default?

Copying is for now done unconditionally and without any customization.  If those
will turn out necessary, then they will be added later.
2022-10-09 10:25:39 +02:00
Daniel - 799f1be1f6
Remove obsolete template copying functions
Everything is now covered by `db/org-copy-template`.
2022-10-09 09:56:09 +02:00
Daniel - 7169a6b83e
Allow general org-read-date syntax in workload overview report
This is already allowed by the docstring, but now also supported by calling
`org-read-date` on the original inputs (if given).
2022-10-07 15:45:53 +02:00
Daniel - 047627c6ac
Allow no start date in workload overview report
This is different from the previous default start date of today, as now all past
items will also be considered.  Additionally, also include the start date (or
today, if not given) to be included in the result table to show all efforts
still left for that day.
2022-10-07 15:42:02 +02:00
Daniel - bc3ab8b901
Fix template copy mechanism when template is in other buffer
Forgot to switch buffer when marker in other buffer is given.
2022-10-03 10:11:17 +02:00
Daniel - 12b001221c
Fix workload report in case of time range with individual timestamps
Simply replacing the first and last characters of a timestampt with `[` and `]`
is not sufficient when a time range is given with a start timestamp and an end
timestamp, because then the result would be something like `[2022-09-30 Fri
08:00>--<2022-09-30 Fri 09:00]`.  So let's replace all `<` with `[` and all `>`
with `]`, just to be save.
2022-09-30 14:54:30 +02:00
Daniel - befcf95d1f
Include deadlines in agenda time grid effort summary
When deadlines are listed on the time grid because they are due, their effort
should also be considered in the effort summary, shouldn't it?
2022-09-23 15:47:45 +02:00
Daniel - f4f69b34c7
Add first version of workload overview report
This report will list the incremental planned workload between a given time
range using a given increment.  This way, one may better at finding time to
schedule new tasks coming in.

The current implementation might be slow, because it's calling a complete
parsing process for each step in the overview report.  One could instead think
about calling it only once and then disecting the individual tasks for when they
are planned specifically.  But before we dive in these complications, let's
frist see whether the report is worth it.
2022-09-17 10:17:25 +02:00
Daniel - 5396c7c37f
Fix typo in workload report timestamp extraction 2022-09-15 10:22:27 +02:00
Daniel - 257c2c815d
Convert active timestamps in workload report into inactive ones
Otherwise, agenda views get mixed up.
2022-09-10 09:55:55 +02:00
Daniel - e5bad8b847
Allow entries in workload report to be sorted 2022-09-10 09:40:32 +02:00
Daniel - 735570d7c0
Include various timestamps in workload report
This should make it easier to decide which entries could be moved in case too
much work is planned for the upcoming days.
2022-09-10 09:25:37 +02:00
Daniel - cbd088977e
Update docstring for workload report 2022-09-10 09:17:41 +02:00
Daniel - 2e895a23fa
Allow nil dates in workload report to ignore those constraints
Emacs Lisp is fun :)
2022-09-10 09:12:02 +02:00
Daniel - 2616693233
Allow custom org-ql filter expression in workload report
Nice!
2022-09-08 18:37:42 +02:00
Daniel - 5ab5ec6aec
Format links in workload report to not include links themselves
Standard.
2022-09-07 18:06:36 +02:00
Daniel - 88a0d85006
Handle unset efforts in workload report 2022-09-07 17:41:09 +02:00
Daniel - 2e09ef6c9e
Add workload report functionality
This special kind of dynamic block inserts all planned tasks between two dates
and sums up it's efforts.  This could help in deciding what additional tasks to
accept or what dates to promise for completion of new tasks.
2022-09-06 18:34:12 +02:00
Daniel - 8b97b092c4
Allow to customize whether the eshell prompt contains the git state
Since all of this is slow on Windows, it's better to be able to disable it.

Sigh.
2022-08-31 18:43:35 +02:00
Daniel - 2b7960d427
Do not rely on / file separator in eshell git prompt 2022-08-30 19:09:10 +02:00