Commit Graph

586 Commits

Author SHA1 Message Date
Daniel - 732323edfc
Ensure to always return a marker when inserting links to other items
`org-refile-get-location` sometimes only returns a point and not a marker.  In
that case, manually convert the point to a marker to ensure that calling
functions now where to go to.  Additionally, ensure that
`db/org-default-org-file` is opened if not already done so, and error out if the
current buffer is not associated with a file and no default Org file exists.
2021-03-27 10:22:21 +01:00
Daniel - 00ca4c0276
Minorly simplify definition of Org linking hydra
This way, the help buffer of the hydra provides a link to the underlying
function.
2021-03-27 09:48:55 +01:00
Daniel - 22058b1568
Allow adding links to other items without refile verification
We are only using the refile mechanism for convenience here, and not for actual
refiling.  The refile verification function is thus not relevant here.  To take
effect, we also have to ignore the cache, as it may hold precomputed targets
that have used the refile verification function in a previous run.
2021-03-26 16:47:22 +01:00
Daniel - d6584ef521
Fix signature of frame hook function
This got removed in the last refactoring attempt.
2021-03-26 16:38:17 +01:00
Daniel - d7b2ad0b71
Extend docstring for hydra-org-linking 2021-03-20 20:50:27 +01:00
Daniel - fd14313b9b
Only warn about RESET_CHECK_BOXES if it's really there 2021-03-20 16:33:00 +01:00
Daniel - 7833e28185
Make checkdoc happy about db-org 2021-03-20 16:03:12 +01:00
Daniel - 6e8b878b4d
Warn when using the deprecated RESET_CHECK_BOXES property
I want to use periodic tasks for repeated tasks with check boxes.
2021-03-20 15:57:45 +01:00
Daniel - bfcca623dc
Make checkdoc happy about db-hydras package 2021-03-20 15:48:00 +01:00
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 - 1788ceb0f4
Resolve flycheck warnings in db-music 2021-02-24 14:14:08 +01:00
Daniel - b0df6465f8
Remove duplicate overwrite confirmation when updating playlist
We explicitly ask for confirmation already, no need to let EMMS ask again.
2021-02-24 14:03:17 +01:00
Daniel - f982f37d69
Use relative file names when updating playlist
This is the documented behavior, the previous usage of absolute file names was a
mistake.
2021-02-24 13:58:43 +01:00
Daniel - 1df794ebf2
Omit null strings when updating playlists
Inserting a null string results in all files in the current buffer to be added
to that playlist.  Finding this bug was tricky!
2021-02-24 13:58:10 +01:00
Daniel - 015d218431
Fix wrong handling of EMMS' current playlist buffer during export
The macro `with-current-emms-playlist' does not set the current playlist to the
current buffer, but instead switches to it.  Yes, that's reasonable, but not
what I thought it does.  Since I need the reverse (make the current buffer to
temporarily be the current playlist), we simply bind `emms-playlist-buffer' to
the value returned by `current-buffer'.

While we are at it, also make info loading synchronous by binding
`emms-info-asynchronously' to nil.
2021-02-24 13:35:43 +01:00
Daniel - b148c41c98
Sort tracks in auto-generated playlists by title and author
For this, the playlist export of EMMS is used to enable sorting by track
metadata.  The current implementation is a first try and may contain some bugs
when track metadata is not readily available.
2021-02-24 13:10:08 +01:00
Daniel - 8039aad605
Update docstring for git-annex playlist generation function
It's not generating a playlist, but a list of absolute file names that are later
used to generate a playlist proper.
2021-02-06 18:18:35 +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 - e4f02647a2
Refactor code to update magit's repository list to separate function
This allows easier updates of this list, without having resort to executing the
corresponding code manually.  In the future, we could even update that list
automatically by attaching the new function to some of projectile's hooks or
something.
2021-01-17 09:15:01 +01:00
Daniel - a49d7fc76d
Remove calls to some obsolete CL functions 2021-01-16 14:34:48 +01:00
Daniel - 56c9f940ce
Fix line-ending issues with MIME and Outlook
Outlook seems to expect CRLF in S/MIME signed+encrypted mails, so we add those
somewhere in the process of encoding the mail.  Furthermore, Outlook is sending
MIME messages with CRLF line endings, and we have to take care of that when
looking for the end headers.

The changes proposed here are preliminary and subject to further testing.
2020-12-12 18:05:57 +01:00
Daniel - 6742695f53
Enable flycheck mode in Emacs Lisp only when buffer has a file
Flycheck used to be activated unconditionally, resulting in annoying warnings
when evaluating Lisp expressions in the minibuffer with `pp-eval-expression`,
and in the scratch buffer.
2020-11-28 08:50:47 +01:00
Daniel - 44c23b7a28
Do not partially fetch articles
This leads to errors when forgetting to fetch the complete article before
forwarding it.  Moreover, redisplaying the article sometimes leads to a
completely fetched article to be displayed only partially again, resulting in
repeated fetched.  Finally, the performance gain is not worth the effort in my
setup, so let's just disable it.
2020-11-06 20:20:36 +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 - a2ce6ebc59
Show current zoom level in corresponding hydra 2020-09-26 11:22:59 +02:00
Daniel - 57044376be
Do not treat dotfiles as projects 2020-09-20 16:40:48 +02:00
Daniel - 2c4cada1da
Also look into org-agenda-files when checking for missing bookmarks 2020-09-20 16:35:33 +02:00
Daniel - ce9a2f51eb
Add linting function for project management 2020-09-20 16:33:24 +02:00
Daniel - 66da74d63e
Fix typo 2020-09-20 16:22:29 +02:00
Daniel - 7a0fbff4c5
Do some cleanup in db-projects 2020-09-20 16:20:23 +02:00