Commit Graph

631 Commits

Author SHA1 Message Date
Daniel - 5bc7c70882
Add function to copy template of Org Mode item to location at point
This is a convenience function and has been bound to a shortcut for easier
usage.  This function is supposed to be the standard way to copy templates.
2021-12-15 09:43:50 +01:00
Daniel - 80eeca1e44
Add simple function to find template via special property
This allows both a more fine-grained and more flexible control over where
templates can be located and which templates are suppoed to be used for the item
at point.  This function could also be bound to a custom key binding to make it
easier to invoke.
2021-12-13 21:32:05 +01:00
Daniel - eafebe1cb9
Add simple function to directly render html from a file
This is simpler than opening the file in a buffer and calling shr-render-buffer,
with some buffer maneuvring afterwards.
2021-12-13 21:17:45 +01:00
Daniel - cedaae00e8
Make template copy function more robust
Instead of going upward from the end, we now just start from the beginning and
skip all drawers we may encounter.  This should also allow to copy subtrees in
templates, although adjustments to the headline indentations might be necessary
if the template and point are on different levels.
2021-12-13 21:17:18 +01:00
Daniel - 159c8c0eb6
First check for major mode when update Org item headline 2021-11-29 17:39:33 +01:00
Daniel - 5c36dba12c
Make function to update Org item headlines also work in agenda 2021-11-29 17:39:27 +01:00
Daniel - 25a7051c12
Add function to update headline of Org mode item and log note
This allows changing the headline of an item if it's scope changes and record
this change in a note.
2021-11-29 17:16:25 +01:00
Daniel - 6064f0e4b3
Add more test cases for base45 decoder 2021-11-07 10:04:16 +01:00
Daniel - b072e32988
Add more test cases for base45 decoder function 2021-11-07 09:10:09 +01:00
Daniel - 24bb768e3d
Simplify character conversion in base45-decode-string
This actually renders the separate translation function obsolete, it has been
inlined now.
2021-11-07 08:56:06 +01:00
Daniel - f1c3af9ea7
Add some regression tests for base45 decoder 2021-11-07 08:41:00 +01:00
Daniel - f52f48273a
Allow input of base45 decoder to also contain lower-case letters 2021-11-07 08:40:30 +01:00
Daniel - e15be73bc1
Fix insertion of text from hex numbers
Using `insert` directly makes use of character conversion and may scramble the
byte when inserting into the buffer (indeed, `insert` does not seem to insert
the byte, but the characters whose code-points is given in the string; same for
`insert-char`).
2021-11-06 17:49:49 +01:00
Daniel - a8cfeaf69f
Add simple function for base45 decoding
For playing around with EU Covid Certificates.
2021-11-06 17:49:46 +01:00
Daniel - ef2932fed7
Always print two bytes when converting text to hex 2021-11-06 15:35:29 +01:00
Daniel - 0d1fe48e6f
Allow to copy template from outside of current file
My checklist template are usually located in a separate file, and sometimes even
in more than one.  Being able to copy those template to point is thus crucial.
2021-10-29 14:35:35 +02:00
Daniel - 747e505fda
Revert "Exclude NOTEs as refile targets"
Excluding NOTEs as refile targets also excludes them as jump targets for C-u C-c
C-w, which is bad.  Better move all NOTEs out of the main task list into a
separate notes.org or something.

This reverts commit 90b6e91051.
2021-10-24 12:56:29 +02:00
Daniel - 6b5d40b09b
Update local copy of plantuml-mode 2021-10-16 18:45:41 +02:00
Daniel - 5b10f83303
Fix typo 2021-10-16 12:27:56 +02:00
Daniel - c17bc4c1ab
Explicitly set frame title when current Org task changes
This should enable new frames to show the correct title, and not just the
default "emacs" string.
2021-10-16 12:21:02 +02:00
Daniel - 90b6e91051
Exclude NOTEs as refile targets
NOTEs are meant to hold information for the project at hand, and not to collect
tasks, because NOTEs are meant to live longer than those tasks.  Use dedicated
subprojects to group tasks.  Task may (and probably should) refer to NOTEs for
keeping long lasting information, though.
2021-10-16 10:12:51 +02:00
Daniel - b952504c81
Fix org mode category refresh when redisplaying timelines
Iterating over the current set of file names may not work when no files are
given (in which case all agenda files should be visisted).  However, instead of
fixing the set of files, it should be more robust to find all referenced buffers
by iterating over the markers of the entries.  In that case, even if a file is
visited by multiple buffers, we can be sure that the right buffers are referesh
before the timeline is redrawn.
2021-09-30 15:35:18 +02:00
Daniel - 785db3ded8
Fix typo in linking hydra 2021-09-04 16:17:35 +02:00
Daniel - a1f0acfd87
Add custom function to list git-annex files via dired
This can already be done by using `db/dired-from-shell-command`, but it's more
convenient to have a specific command for this.
2021-08-24 10:18:36 +02:00
Daniel - e14a7248b0
Directly complain when not file are available in custom dired view
Otherwise, a rather confusing error message is displayed about not being able to
find a file called "Command output" in the current directory.
2021-08-22 09:32:05 +02:00
Daniel - 106f286285
Include symlinks in custom file listings, even if they are dangling
When listing files, it's not relevant whether the file is readable or whether
a symbolic link points to a non-existing file.  What matters is that the file
itself exists, either as a file or as a symbolic link.

This is relevant when using `git annex find` to list files matching some search
criteria.
2021-08-21 09:51:54 +02:00
Daniel - 158601f012
Make custom function to query for locations in Org mode files public
This function is referenced in some doc string already, and could as well be
public, so let's make it so.  This amounts to removing a dash from it's function
name.
2021-08-08 13:51:52 +02:00
Daniel - ca679b2274
Refactory template copy function into function to copy item bodies
This allows the same copy behavior as before (apart from newly introduced bugs,
that is), but in addition gives the possibility to copy bodies of arbitraty
items that can be choosen interactively.  This might come in handy when copying
general checklists from anywhere in the main Org mode file to the current task.
2021-08-08 13:49:07 +02:00
Daniel - b4621122cc
Update local copy of plantuml-mode
This is now at e7c08c588b/plantuml-mode.el.
2021-08-07 17:31:27 +02:00
Daniel - b0703bee01
Update local copy of plantuml-mode
This contains an experimental implementation for file exporting.
2021-08-03 20:40:09 +02:00
Daniel - 54263ab599
Add local copy of plantuml-mode
This contains my changes, it will be removed as soon as upstream catches up.
2021-08-03 17:38:21 +02:00
Daniel - 76990dcdf2
Allow fast link creation to items recentely associated with clocking
This allows to insert links to items that were recently clocked into.  The
selection to those items is done via `org-clock-select-task`, which itself will
display items from `org-clock-history`.
2021-07-17 08:47:37 +02:00
Daniel - b85246ae7c
Add shortcut to timeline for deleting other windows 2021-07-03 17:54:15 +02:00
Daniel - c3a099fd6a
Add shortcut to timeline of day to frequently used features
I am using this frequently, so let's put it there!
2021-07-02 17:38:22 +02:00
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