Commit Graph

389 Commits

Author SHA1 Message Date
Daniel - 1f348e256d
Disable refile verification when jumping to any Org item
Any item could be of interest, not only those that are valid refile
targets.

This might be slow.  May we should not be using the refile mechanism to
jump to any item?
2024-04-01 11:16:15 +02:00
Daniel - 63eeefcb8e
Ignore backlink items tagged HOLD in default checklist
Items tagged with HOLD should be ignored in normal processes and should
thus not appear as backlinks.  Items tagged WAIT are supposed to appear,
though, and are not excluded from the list of relevant backlinks.
2024-03-25 17:48:50 +01:00
Daniel - 8876f04756
Harden shortcut to jump to any Org heading from anywhere
In the previous implementation, when in some buffer which is not an Org
buffer that accidentally contains lines that partially match the regular
expression describing an Org heading, errors could occur when the Org
refile cache was empty.  To address this issue, let's temporarily switch
to some Org buffer before generating the list of all Org heading
targets.
2024-03-16 17:08:00 +01:00
Daniel - 7d398a66c8
Replace counsel Org heading dispatch by org-refile
This is nice enough and removes the last dependency to counsel :)
2024-03-09 15:04:21 +01:00
Daniel - aadca01244
Simplify Org clocking hydra
No need to define an anonymous function her, just make the call
directly.
2024-03-09 15:03:10 +01:00
Daniel - 1cc7abd4d7
Clarify that remaining time is computed over clocked time of subtree 2024-01-22 19:52:27 +01:00
Daniel - af05bd2106
Collect custom Org key bindings in a custom hydra 2024-01-07 17:12:27 +01:00
Daniel - b7d190c513
Introduce separate hydra for Org jump commands
`hydra-org-clock` thus only hosts keybindings for clock-related
commands, while the new `hydra-org-jump` is for jumping to Org items in
various ways.  Feels cleaner to me this way.
2024-01-01 17:04:55 +01:00
Daniel - 5ebeeef3fd
Ensure point is on current clock when setting default task
Not sure whether this is the case otherwise.

Also add output when the default task is set, to see when it's set
accidentally.
2023-12-10 19:04:07 +01:00
Daniel - d1e3409e80
Only search for parent task for clock continuation when necessary
Avoid unnessary work by leveraging the fact that `setq` returns the new
value of the variable being set :D
2023-12-08 17:45:10 +01:00
Daniel - 498f4b78c4
Automatically clock into interrupted task only when not closed yet
This is to avoid jumping back to old task that are still pointed at by
`org-clock-interrupted-task` that have long been closed.  Let's see
whether this is enough to handle this case.
2023-12-08 17:43:59 +01:00
Daniel - 7128144ee0
Fix errors in some docstrings 2023-12-08 17:27:29 +01:00
Daniel - 482cebea68
Fix docstring for clock continuation function
Forgot to adapt this previously.
2023-12-06 16:40:56 +01:00
Daniel - 416ba934f9
Resume clock at interrupted task when available 2023-12-06 16:31:05 +01:00
Daniel - 2407f4196f
Fix typo in hydra docstring 2023-11-05 12:04:38 +01:00
Daniel - a959152d21
Increase highlighting of valid keys in Org clock hydra
This improves spotting the available keys, I think.
2023-11-04 09:35:40 +01:00
Daniel - f14a5b6237
Make default Org clock hydra a bit more descriptive 2023-11-03 16:55:24 +01:00
Daniel - 44b78dbef1
Make main Org hydra a bit more consistent and self documenting
In particular, use “j” instead of “c” for jumping to the current clock, like the
standard Org bindings use it.
2023-11-01 21:06:35 +01:00
Daniel - aeff0883bb
Fix missing description in main Org hydra 2023-10-23 17:37:38 +02:00
Daniel - badbb85da0
Ensure `org-password-manager` is loaded when loading password by ID
Otherwise, `org-password-manager-default-password-wait-time` may be undefined
during runtime.
2023-08-18 19:21:14 +02:00
Daniel - a6324a668d
Move custom org-password function to db-org
This is where it belongs, even if there's a warning about free variable
referencing.
2023-08-17 17:06:42 +02:00
Daniel - e30ab3f260
Ensure inserting links works when the source buffer is narrowed 2023-08-15 18:11:47 +02:00
Daniel - d6ffc0ba40
Avoid duplicate backlink targets in backlink reports
I am not sure yet when duplicate entries happen, but they do happen
occasionally.
2023-08-12 10:52:58 +02:00
Daniel - e892a849c1
Allow to set an initial input when inserting a link to another item
This will allow to bind `db/org-add-link-to-other-item` with different initial
inputs to different keys to have often used selection directly at hand.

Setting the initial input is a bit tricky, though, because
`org-refile-get-location` does not allow to set it.  Instead, we have to
temporarily overwrite `completing-read` with the corresponding parameter set
directly.
2023-07-29 20:08:19 +02:00
Daniel - c0660fe0f6
Give argument of `db/org-get-location` a more descriptive name
It's not a universal arguments, so calling it ARG is not only just
non-informative, but also misleading.
2023-07-29 19:50:12 +02:00
Daniel - 56f60e97d3
Add shortcut to jump to current clock in main Org hydra
Had forgotten about that one, sorry.
2023-07-21 10:26:44 +02:00
Daniel - 1d33039dde
Unfold subtree before evaluating all source blocks
This is meant to mitigate an issue with table alignment when those tables are
results of source blocks, contain links in cells and are hidden (i.e., folded):
in those circumstances, the table alignment seems to be broken, because the cell
width does not take into account that links are shorter than their textual
representation.

I am not quite sure whether this is a bug in my configuration or a bug in Org
mode itself.  The function to compute cell width is `org-string-width`, but
maybe this function does not get passed the correct input when tables are folded
and need to be aligned?
2023-07-17 20:14:09 +02:00
Daniel - 3bb5b4481d
Search through all Org mode buffers when inserting backlinks
This seems to be fast enough, and since I often find myself aborting a current
backlink insertion query because I missed to include all Org mode buffers,
making it the default only seems to be reasonable.
2023-07-02 16:44:36 +02:00
Daniel - 9ff7c848a1
Change shortcut for interactive clock selection
This is for consistency with all other commands that use "s" to select a running
clock from the history.
2023-05-28 15:30:18 +02:00
Daniel - f8caaae071
Allow adding links to Org items also in non-Org-mode buffers
The relevant use-case (for me at least) is to insert links to Org items in the
minibuffer when capturing new items.
2023-05-26 18:08:22 +02:00
Daniel - 113f3f4495
Fix invalid logic for nil dates in workload report
When not provided in dynamic workload reports, `start-date` and `end-date`
should be treated as unconstrainted.  However, instead dates were queried
interactively in that case, because `org-read-date` is being used to normalize
date display.  Fixed that.
2023-05-24 19:25:02 +02:00
Daniel - a4712cf155
Include items in workload overview planned before given start date 2023-05-24 18:59:39 +02:00
Daniel - cac41d0759
Do not recenter position when jumping to current clock
This keeps the current view as it is in case it's already visible in some
buffer.
2023-05-16 18:26:14 +02:00
Daniel - 58e5cd3506
Jump to headline of the currently clocked item when going there
Before this change, we went to the position of the open clock, which is not
where we want to be in case no open checklist item is found.
2023-05-16 18:25:00 +02:00
Daniel - 0b315f44a3
Go to Org item when trying to insert checklist directly in agenda
This is expected behavior in my point of view.
2023-05-13 10:30:29 +02:00
Daniel - 01b5e1b8db
Fix incorrect restriction handling when inserting templates
We must widen the current restriction when searching for the template item, not
when copying the body from it.  In the latter case, `org-with-point-at` will
handle the necessary widening.
2023-05-06 18:03:14 +02:00
Daniel - 925cf115be
Remove ID and CUSTOM_ID properties when inserting checklist template
When the template associated with the item at point contains sub-items itself,
those may have been assigned ID or CUSTOM_ID properties.  Copying the template
would thus duplicate these properties, violating their implicit uniqueness
constraint, so we now remove those properties from the inserted checklist
template.
2023-05-06 16:54:38 +02:00
Daniel - fa56dfdd4d
Ensure `CHECKLIST_INSERTED_P` will be inserted at original heading
When a checklist template contains headings on its own, the
`CHECKLIST_INSERTED_P` property until now would be inserted at the last heading
in this template, instead of at the heading where the template is supposed to be
inserted in the first place.  Fixed this.
2023-05-06 15:30:16 +02:00
Daniel - b67a920780
Fix wrong search region for inserting active filter display 2023-04-29 17:35:20 +02:00
Daniel - a44b7b660e
Remove obsolete function to skip tags in agenda views 2023-04-29 17:28:35 +02:00
Daniel - 8c9c47f6e3
Prominently display of active filters in agenda view
Displaying the current filters in the mode line alone often goes unnoticed for
me, so I need a more direct display.  Let's add it to the first structural
header.
2023-04-29 17:27:50 +02:00
Daniel - 71f07d1e8f
Remedy some flycheck and checkdoc warnings coming from `db-org.el` 2023-04-07 12:52:35 +02:00
Daniel - 347a3bf08d
Clean up personal Org utility functions
Mostly moving functions around and updating page headers.  Also removed some
obsolete functions, see updated command list for `db-org` use-package
declaration.
2023-04-07 11:49:58 +02:00
Daniel - c3a96fc342
Use display-buffer when jumping to currently clocked item 2023-04-06 18:10:56 +02:00
Daniel - c061357893
Note current limitation in computation of remaining effort time 2023-04-06 17:58:22 +02:00
Daniel - f120e4b01f
Remove redundant conversion of remaining effort durations
When sorting, we need the remaining efforts as numbers, so let's return those
numbers directly instead of first converting them to durations only for them to
be converted back to numbers.
2023-04-02 10:36:13 +02:00
Daniel - 866f652c4b
Fix nil display in agenda when remaining effort is not set
Just return the empty string instead.
2023-04-01 17:01:00 +02:00
Daniel - 0a14f01729
Sort agenda entries by remaining effort by default
This might be slow and buggy, but let's keep it for now.
2023-04-01 16:57:37 +02:00
Daniel - 1f9e032a1a
Display remaining effort in Org agenda by default
Note that sorting is wrong now, this needs to be fixed later.
2023-04-01 16:50:30 +02:00
Daniel - 13cbd90ec6
Improve checklist insertion
Do not reveal whole subtree, but only the body.  Also jump to first open
checklist item after checklist insertion.
2023-03-21 16:52:27 +01:00