Commit Graph

637 Commits

Author SHA1 Message Date
Daniel Borchmann 0db003d442
Try fixing adding note in headline update function
Let's not try to use the Org mode functions to add notes, but instead do it
directly manually.  I hope this works better now …
2022-03-24 20:16:50 +01:00
Daniel Borchmann 9d7e88df0e
Ensure functioning of Org Clock hydra even if no task is clocked
It happens sometimes that the clock is not active, in which case hydra tried to
replace strings in `org-clock-current-task`, then a nil value.  Fixed this.
2022-02-26 10:16:13 +01:00
Daniel Borchmann 83421c072a
Remove trailing whitespace after HTML rendering a file
Those whitespaces are neither necessary nor helpful.
2022-02-06 20:57:36 +01:00
Daniel Borchmann efb7500202
Add original value as default when changing Org item headlines
This allows to make simple changes to the original headline of an item.
2022-01-08 15:42:40 +01:00
Daniel Borchmann d23a8dc817
Fix adding notes when updating headlines
I think I just did it wrong, so let's try adding a note by calling
`org-add-note` directly.  So far it's working better, but I am not quite sure
whether I really did it right this time.  In any way, `org-add-note` keeps track
of all the bookkeeping for taking notes, so my code is simpler now :)
2022-01-08 09:11:02 +01:00
Daniel Borchmann 407f5d70f2
Add newlines when inserting templates
I find myself inserting these newlines whenever I insert a template, so let's
let them insert them automatically.
2022-01-02 09:31:29 +01:00
Daniel Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 159c8c0eb6
First check for major mode when update Org item headline 2021-11-29 17:39:33 +01:00
Daniel Borchmann 5c36dba12c
Make function to update Org item headlines also work in agenda 2021-11-29 17:39:27 +01:00
Daniel Borchmann 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 Borchmann 6064f0e4b3
Add more test cases for base45 decoder 2021-11-07 10:04:16 +01:00
Daniel Borchmann b072e32988
Add more test cases for base45 decoder function 2021-11-07 09:10:09 +01:00
Daniel Borchmann 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 Borchmann f1c3af9ea7
Add some regression tests for base45 decoder 2021-11-07 08:41:00 +01:00
Daniel Borchmann f52f48273a
Allow input of base45 decoder to also contain lower-case letters 2021-11-07 08:40:30 +01:00
Daniel Borchmann 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
2021-11-06 17:49:49 +01:00
Daniel Borchmann a8cfeaf69f
Add simple function for base45 decoding
For playing around with EU Covid Certificates.
2021-11-06 17:49:46 +01:00
Daniel Borchmann ef2932fed7
Always print two bytes when converting text to hex 2021-11-06 15:35:29 +01:00
Daniel Borchmann 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 Borchmann 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 or something.

This reverts commit 90b6e91051.
2021-10-24 12:56:29 +02:00
Daniel Borchmann 6b5d40b09b
Update local copy of plantuml-mode 2021-10-16 18:45:41 +02:00
Daniel Borchmann 5b10f83303
Fix typo 2021-10-16 12:27:56 +02:00
Daniel Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 785db3ded8
Fix typo in linking hydra 2021-09-04 16:17:35 +02:00
Daniel Borchmann 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 Borchmann 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 Borchmann 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
2021-08-21 09:51:54 +02:00
Daniel Borchmann 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
2021-08-08 13:51:52 +02:00
Daniel Borchmann 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 Borchmann b4621122cc
Update local copy of plantuml-mode
This is now at e7c08c588b/plantuml-mode.el.
2021-08-07 17:31:27 +02:00
Daniel Borchmann b0703bee01
Update local copy of plantuml-mode
This contains an experimental implementation for file exporting.
2021-08-03 20:40:09 +02:00
Daniel Borchmann 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 Borchmann 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 Borchmann b85246ae7c
Add shortcut to timeline for deleting other windows 2021-07-03 17:54:15 +02:00
Daniel Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 56b1de2844
Remove duplication of refile target specification for current buffer 2021-04-16 17:34:40 +02:00
Daniel Borchmann 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 Borchmann 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 Borchmann 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 Borchmann 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