Commit Graph

597 Commits

Author SHA1 Message Date
Daniel - c2f2b23a6c
Add stop shortcut for main music hydra
So far, only a toggle for playing and pausing was available.  Providing a
shortcut for `emms-stop` makes unconditionally sure the music is stoped.

Funnily(?), this also replaces an obsolete shortcut for `emms-show`.
2021-06-13 18:05:40 +02:00
Daniel - 0899a9079e
Clean up all links in headline when linking to it
So far, we only considered one link in a headline and replaced it with its
description when linking to it.  When there are multiple links, this will fail.
This commit changes this by iterating over all links in the headline, not only
the first one.
2021-05-12 18:29:34 +02:00
Daniel - 7960f763f4
Keep headline around links when linking to them
So far, when a link is discovered in a headline, we only keep the description of
that link.  This will throw away the context of that link, which is
undesirable.  So let's keep it.
2021-05-12 18:20:18 +02:00
Daniel - 268ddeb1aa
Avoid complete links in descriptions when adding links to Org items
When inserting links to other Org items or to the currently clocked-in item, the
complete target headline is used as a description in the newly inserted link.
When that target headline is itself a link, the newly inserted link will contain
the complete link as a description, rendering it unreadable and also
malformed (it's not allowed to have two consequtive brackets in the description
of a link).  To remedy this, we now explicitly check the target headline for
being a link, and if so, only use the description of it as the description in
the newly inserted link.
2021-05-12 17:47:45 +02:00
Daniel - a0b1f4df0d
Do not use `org-store-link` when inserting links to other items
When the link to another item is already present in the history of
`org-store-link`, nothing is updated.  Inserting the topmost link then results
in a wrong link being inserted.

Not using `org-store-link` at all fixes this problem and also leaves the history
of `org-store-link` untouched.  It also simplifies the implementation by not
relying on the complexity of `org-store-link`, but instead just only using
`org-entry-get` and `org-id-get-create`.
2021-04-29 19:52:54 +02:00
Daniel - 56b1de2844
Remove duplication of refile target specification for current buffer 2021-04-16 17:34:40 +02:00
Daniel - 77f2dfc0eb
Fix missing specification of default buffer when inserting links
The `default-buffer` is apparently not optional when the current buffer is not
associated with a file.  If `default-buffer` is missing and the current buffer
is not a file-buffer, e.g., a note buffer, then `org-refile-get-targets` fails.
2021-04-16 17:31:55 +02:00
Daniel - 318f7c8f44
Fix reference to wrong buffer when creating links to other items
When finding the location of an Org mode item to link to,
`org-refile-get-location` may return a point even if the target buffer is not
the default buffer.  Resolving point in the default buffer thus yields a false
marker and the inserted link is wrong.  To remedy this, also consider the file
name returned by `org-refile-get-location` to resolve point in the file buffer
for that file.
2021-04-01 17:02:01 +02:00
Daniel - 8f4fa01304
Remove redundant save of point and mark
`org-with-point-at` will do this already (at least for point).
2021-04-01 16:51:46 +02:00
Daniel - 1916eb6736
Move point when inserting link to other Org mode item
This is the natural flow, as usually one continues writing after the link, not
before it.
2021-04-01 16:51:03 +02:00
Daniel - 96638b09e4
Allow to show backlinks directly from Org agenda buffers
This is more convenient than to first switch to the item in the corrsponding Org
mode buffer and then querying for its backlinks.
2021-03-27 10:39:53 +01:00
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