Commit Graph

228 Commits

Author SHA1 Message Date
Daniel - 78b202aed7
Introduce hydra for managing links between Org mode items
It's easier to use and easier to keep track of what is available.  It also saves
key precious bindings!
2021-03-20 15:45:49 +01:00
Daniel - 77920dd9a2
Move cursor forward when inserting link to current clock 2021-03-20 15:45:15 +01:00
Daniel - eae1590e68
Add function to add link to currently clocked-in task
This might be handy while working on a task and realizing that it's related to
another one.
2021-03-20 12:34:39 +01:00
Daniel - fde876a972
Restrict listing of link targets to current buffer by default
This is much faster, and usually what we want.  If references outside the
current buffer are necessary, just prefix the call with a universal argument.
2021-03-20 11:50:56 +01:00
Daniel - 7bfd185514
Add missing require statement for cl-lib 2021-01-29 17:51:26 +01:00
Daniel - 9efb765b5a
Extend documentation for agenda effort summation functions 2021-01-29 17:38:24 +01:00
Daniel - 6ba5fdad61
Fix bug in agenda effort summation if nothing there to display 2021-01-29 17:36:21 +01:00
Daniel - 7582c2065e
Include timestamps in org agenda effort summation
Those correspond to fix appointments.
2021-01-29 17:21:04 +01:00
Daniel - 9cf17c973f
Show sum of daily efforts directly in the agenda
Now that column view does not show effort sums any longer, we need another means
to show daily efforts.  It turns out that this can be accomplished easily using
two simple functions and `org-agenda-finalize-hook`.

This is taken from
https://emacs.stackexchange.com/questions/21380/show-sum-of-efforts-for-a-day-in-org-agenda-day-title#21902.
2021-01-29 17:11:55 +01:00
Daniel - 4ecafaa411
Allow to refile under periodic tasks
Sometimes an instance of a periodic tasks requires individual subtasks.  In this
case, refiling there is very helpful.  In other cases, the extra entries should
not be disturbing too much, I think … I hope.
2020-10-12 16:28:43 +02:00
Daniel - 9907b1b2ae
Allow remote links and backling search for more headlines
Include all headlines in Org agenda files and as well as all extra text search
files in interactive selections.  To make this more managable, introduce a
dedicated function to query the user for a target item.
2020-09-28 19:37:58 +02:00
Daniel - 669ecb6e4f
Trying to make backling searching work for custom-id links 2020-09-26 18:16:43 +02:00
Daniel - 4efb8cfe18
Use org-store-link for adding links to other items 2020-09-26 18:10:34 +02:00
Daniel - 68c6423cae
Fix docstring 2020-09-26 18:07:57 +02:00
Daniel - ff184ec47a
Check whether we are in Org Mode before inserting remote link 2020-09-26 16:48:02 +02:00
Daniel - 1c065bb46b
Add simple function to insert links to other items at point 2020-09-26 16:44:40 +02:00
Daniel - f7ddab7696
Fix error message 2020-09-26 16:29:50 +02:00
Daniel - dd30d5d7be
Set default buffer when querying for Org Mode headlines
Apparently, if the current buffer is not associated with a file, things break.
2020-09-26 15:24:07 +02:00
Daniel - b0a36749e6
Refactor Org Mode link finder function
The main entry point is now `db/org-find-links-to-current-item', which decides
how to obtain the ID and CUSTOM_ID of the item to look for.  The main work is
done by `db/org-find-items-linking-to-id', which does some checks, build the
query, and then calls `org-search-view' (which, indeed, does the actual work).
Users should call `db/org-find-links-to-current-item' only.
2020-09-26 15:20:11 +02:00
Daniel - c219d77ab9
Query for headline in link finder function when outside of Org Mode 2020-09-26 15:12:49 +02:00
Daniel - 994be97397
Fix consistency check for link finder function 2020-09-26 15:12:28 +02:00
Daniel - cde56c819e
Extend backward link searching function
Now support CUSTOM_ID as well, and check arguments for plausibility.
2020-09-26 15:00:34 +02:00
Daniel - a6f77f8d71
Add simple helper function to find items linking to the current one
Only ID links are supported by now.
2020-09-26 14:14:45 +02:00
Daniel - 685d55cf93
Do not require main notes file to be part of org-agenda-files
Neither logging information not tasks should be part of that file, so keeping it
in `org-agenda-files' is not really necessary.  Indeed, it has only been
included in there to allow `org-search-view' to search that file.  However, with
using `org-agenda-text-search-extra-files' makes this approach obsolete.
2020-09-20 10:39:58 +02:00
Daniel - 14cfae155a
Add some documentation for custom agenda deadline listing
It should be clear why we are using this, and not the standard agenda list.
2020-09-17 16:05:20 +02:00
Daniel - 03f23b11fb
Copy complete template for periodic tasks
Previously, we only copied the last element in the subtree, assuming that this
encompasses all of the content of the subtree.  However, this is not true, and
thus we have to do something more elaborate.  Now, starting from the end of the
subtree, we go up all elements in the subtree until we reach either the headline
or a drawer.  Everything in between is copied as template to the current
location.
2020-09-01 16:23:28 +02:00
Daniel - 1ba91b3271
Introduce dedicated variable for main Org Mode file
The shortcut in the frequently-used menu now points there, and not anymore to
the dedicated home and work files.  If only a single main Org Mode file is used,
this variable should be sufficient.
2020-08-27 12:16:54 +02:00
Daniel - b49018129b
Remove trailing whitespace when copying templates for periodic tasks 2020-07-18 19:13:04 +02:00
Daniel - 4084e0ccae
Do not refile to elements of periodic tasks
If separate things should be done, generate a separate item for it, or leave
some note at the corresponding series element.  Periodic tasks are quite rigid
and should not be used for collecting individual subtasks.
2020-07-04 11:43:19 +02:00
Daniel - d1c4ad5b5d
Remove unused `db/org-clock-current-task' 2020-07-01 17:16:39 +02:00
Daniel - 4f063c5e6b
Fix misinterpretation of percent sign in org-clock hydra 2020-07-01 17:15:13 +02:00
Daniel - fa1344bf4e
Silence another byte-compiler warning 2020-06-27 10:12:46 +02:00
Daniel - b5d7b57b27
Use `autoload instead' of `declare-function' 2020-06-27 10:11:13 +02:00
Daniel - c96083c871
Declare `w32-shell-execute' to silence byte-compiler 2020-06-27 09:42:16 +02:00
Daniel - 46d9973146
Move last Org Mode utility function from `db-utils' to `db-org' 2020-06-27 08:56:53 +02:00
Daniel - 0583c08cda
Move Org Mode utilities to `db-org'
`db-utils', the original place, is used for general purpose utility functions.
2020-06-26 23:21:37 +02:00
Daniel - 755fb23e2b
Replace `org-get-tags-at' by 'org-get-tags' 2020-06-26 22:17:25 +02:00
Daniel - b2709c0187
Add missing require for `db-org' 2020-06-26 22:07:14 +02:00
Daniel - 1cad9cc186
Remove obsolete `db/cmp-date-property' function 2020-06-26 22:00:18 +02:00
Daniel - 336ee9d7c4
Incorporate some suggestions from the byte compiler 2020-06-26 21:59:25 +02:00
Daniel - bec4bc13a2
Add new PERIODIC tag for recurring tasks
As described in [1], we are sometimes representing recurring tasks as lists of
single tasks plus a recurring task to create new instances once in a while.  All
of this is grouped under a common headline, and those headlines should be marked
with PERIODIC to inhibit automatic clock-in.

[1]: https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/
2020-01-31 10:41:08 +01:00
Daniel - 38f7fd7c88
Move some more custom org mode link handlers to `db-org'
This is where they belong, nowhere else.
2020-01-19 17:21:14 +01:00
Daniel - c566908deb
Let the org mode RFC link handler cache its documents
RFC documents do not change over time.  The custom org mode link handler
`db/org-rfc-open' now makes use of this by downloading RFC documents to
`db/rfc-cache-path' (if defined) and opening the files locally.  If
`db/rfc-cache-path' is not defined, the RFC is opened in an external browser as
before.

This allows to keep a selection of used RFC documents locally on the filesystem
for future reference, without the need to retrieve them again from the IETF.

Since this is all org mode related, the handler now also resides in `db-org'
instead of `db-utils'.
2020-01-19 17:17:47 +01:00
Daniel - 6f856c61b6
Properly declare ignored variable 2020-01-05 14:42:13 +01:00
Daniel - 243e579973
Check whether special org-mode files are included in agenda when displaying it 2020-01-05 13:36:37 +01:00
Daniel - ec83430a70
Remove `db-update-org-agenda-files'
It's not used anymore and won't ever work as intended.
2020-01-05 13:06:50 +01:00
Daniel - 5627da7b42
Simplify output 2020-01-05 12:18:33 +01:00
Daniel - 541940d7dc
Fix glitch in custom setter for `org-agenda-file' 2020-01-05 12:17:37 +01:00
Daniel - e234912180
Inline `org-agenda-file-to-front'
This allows to use the value for the new file directly, instead of opening a
buffer for it.
2020-01-05 12:10:31 +01:00
Daniel - cf14629099
Remove obsolete debugging output 2020-01-05 11:57:43 +01:00