Commit Graph

835 Commits

Author SHA1 Message Date
Daniel - aec896c939
Always display shell buffers at bottom of frame in dedicated window
Inspired by https://www.masteringemacs.org/article/demystifying-emacs-window-manager.
2023-02-11 19:33:19 +01:00
Daniel - 95920f8291
Extend default scope for `db/org-get-location` when in agenda files
When inside a file that is part of `org-agenda-file`, the default scope to
search for locations via `db/org-get-location` (used for example when
interactively inserting links) is extended to include all agenda files, and not
only the current buffer.  The idea behind this is to consider all agenda files
as one large data collection, and not only individual files.  This inhibits the
usual error, when trying to insert links at items located in refile.org, that
links are only displayed for items in refile.org itself – which are usually not
many – when instead links to items in the default org files where actually
requested.

This should not be an issue for performance, as searching through all agenda
files for valid locations is fast even on Windows.
2023-01-20 18:39:00 +01:00
Daniel - d9b0543409
Remove obsolete warning in workload overview report docstring 2023-01-16 19:21:49 +01:00
Daniel - d373976965
Fix off-by-one error in workload overview report end-date handling
Pushed one to much, so just removed it afterwards.
2023-01-16 19:20:44 +01:00
Daniel - 558bb0b1cc
Make timestamp format in workload overview report consistent
Brackets for both timestamps.
2023-01-16 19:16:04 +01:00
Daniel - bb7da2e08e
Change timestamp format in workload overview report to internal time
`org-read-date` seems to have bug that it does not consider the hh:mm part of an
input string sometimes.  Trying to work around this by using internal times
whenever possible, but it's not complete yet.
2023-01-16 19:09:04 +01:00
Daniel - 4e5cad2842
Fix off-by-one error in workload overview report
Found that the report will only produce reasonable output when always working on
00:00.  Left a note in the docstring to warn about this, should be fixed later on.
2023-01-16 17:26:32 +01:00
Daniel - d699fc8450
Add property to exclude individual Org items as checklist backlinks
Use case: do not add a workload report (which usually contains links to all
current tasks) when inserting checklist backlinks; they do not carry any
information and are thus not relevant.
2023-01-13 22:31:41 +01:00
Daniel - fc4d6b7767
Fix some identation
but not all, in particular not the one of the `cl-flet` call; see
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9622 for this.
2023-01-12 16:46:26 +01:00
Daniel - f534833520
Add caption with time for workload reports
Those reports are only relevant when known when they have been generated.

This is similar to the caption added to dynamic clocktable blocks.
2023-01-12 16:33:07 +01:00
Daniel - 2423dcf6cd
Fix start date in workload overview report to midnight
This is the expected behavior: when no start date is given, it should default to
today (the whole day), and not exactly now, so that day increments do not start
in the mid of the day, yielding misleading results.
2023-01-11 21:17:02 +01:00
Daniel - 28b2047ad6
Fix stacking of summed effort estimations upon agenda refresh
When refreshing the Org agenda without completing redrawing it (i.e, by calling
`org-agenda-filter-by-tag`), effort estimates where added for every refreshing,
causing them to stack up.  We now check whether a summed effort estimate is
already present and remove it before adding it again.

(Maybe one could also just skip the effort recalculation if the a summed effort
estimate is already present, but I am not sure whether this will cause display
inconsistencies when new events are added or old ones are deleted.)
2023-01-11 20:44:19 +01:00
Daniel - 6ed088d2da
Fix missing summation of time blocks in agenda 2023-01-11 20:22:29 +01:00
Daniel - a54ade74a4
Push links to Org items always to top of currently known links
When adding a link to an item via `org-store-link`, and the link is not known
yet, the links is always put at the beginning of the list of currently known
links, as stored in `org-stored-links`.  This allows to conveniently insert this
link via `org-insert-link` by just choosing the first element of the list, which
is selected by default.

However, when the link to the requested item is already present in
`org-stored-links`, the link is not pushed to the beginning of
`org-stored-links` by `org-store-link`, but kept where it is.  When calling
`org-insert-link` to insert a link to the item, manual selection of the correct
link is required, which is annoying and unnecessarily interrupting the current
workflow.  Even worse, when overlooking the notification that the link is
already stored, one will assume that the link to the requested item is at the
top of `org-stored-links` (which is isn't), subsequently inserting false links
when blindly calling `org-insert-link`.  (Yes, this has happend to me …)

This patch fixes this issue by ensuring that links to items (regardless whether
they have already been known or not) are always put at the front of the
`org-stored-links`.  This patch also removes the rarely used
`db/org-clear-stored-links` function, whose purpose was to provide some kind of
workaround, but turned out not to be convenient enough to actually be
used (because it also removed potentially useful links when clearing the cache).
2022-12-20 08:46:47 +01:00
Daniel - 461f212529
Simplify file pattern query for grep
The original version of `grep-read-files` includes file names in its default
values, giving an irritating completion candidate list when used with ivy.
Changed this to just let `completing-read` do the completion itself.
2022-12-15 16:29:36 +01:00
Daniel - 7c9f795a38
Add function to jump to template associated with the item at point 2022-12-15 14:16:52 +01:00
Daniel - 64bc1c762b
Jump to first open checkbox in currently clocked-in item by default
When no open checkbox is found, just jump to the headline of the item, as
before.
2022-11-19 16:09:38 +01:00
Daniel - 69f3f80a6e
Allow empty template when inserting checklists to Org item
In some cases, the backlinks may be sufficient as checklist.
2022-11-12 16:56:29 +01:00
Daniel - bba3adef3d
No not print empty backlink table when inserting checklist
In case there are not backlinks, replace the empty backlink table with a simple
"none".  I think that's cleaner :)
2022-11-12 15:46:49 +01:00
Daniel - d8c8e2b272
Do not backlinks in checklists when scheduled in the future
Items scheduled in the future are generally ignored, so let's do this in
checklists as well.
2022-11-12 11:50:53 +01:00
Daniel - 150b17c22b
Look up parent depth for backlinks in checklist via item property 2022-10-30 12:04:13 +01:00
Daniel - c9dcc7778e
Use Org builtin function to format links in strings 2022-10-29 10:17:28 +02:00
Daniel - e8fae32071
Match namespace prefix for project utilities with package name 2022-10-16 21:10:45 +02:00
Daniel - 4b4f187869
Update package comment for db-projects.el 2022-10-16 21:01:59 +02:00
Daniel - 425792a2ee
Do not create dummy directories when setting up a new project 2022-10-16 21:00:40 +02:00
Daniel - 72d6904968
Minor cosmetics in personal project utilities 2022-10-16 20:59:02 +02:00
Daniel - 7663b82800
Stop using “long names” in personal project utilities
They have only been used in project diaries, and since these are gone now, long
names should go too.
2022-10-16 20:58:11 +02:00
Daniel - 137bafeb0b
Remove bookmark management from personal project utilities
I stopped using project diaries some time ago, so let's get rid of this
functinality.
2022-10-16 20:56:28 +02:00
Daniel - 93fee67983
Remove obsolete eshell magit command
Just use `magit` directly, eshell understands this.
2022-10-13 17:22:31 +02:00
Daniel - 0c84493abc
Do not include TEMPLATE in inserted checklists
References to item at point contained in templates are usually not meant to be
considered manually, but just to automatically insert backreferences.
2022-10-09 11:36:43 +02:00
Daniel - 754e22dc77
Update function name and docstring for Org template copy function
We are now not merely copying a template from another item, but more abstractly
insert a checklist consisting of backlinks and a template.  Update docstring and
function name to reflect that, but keep the old name of `db/org-copy-template`
as an obsolete alias.
2022-10-09 11:22:36 +02:00
Daniel - 564990a1af
Automatically add backlinks when copying templates
Experimental

Backlinks are an integral part of the checklist for the item at point, so why
not include them per default?

Copying is for now done unconditionally and without any customization.  If those
will turn out necessary, then they will be added later.
2022-10-09 10:25:39 +02:00
Daniel - 799f1be1f6
Remove obsolete template copying functions
Everything is now covered by `db/org-copy-template`.
2022-10-09 09:56:09 +02:00
Daniel - 7169a6b83e
Allow general org-read-date syntax in workload overview report
This is already allowed by the docstring, but now also supported by calling
`org-read-date` on the original inputs (if given).
2022-10-07 15:45:53 +02:00
Daniel - 047627c6ac
Allow no start date in workload overview report
This is different from the previous default start date of today, as now all past
items will also be considered.  Additionally, also include the start date (or
today, if not given) to be included in the result table to show all efforts
still left for that day.
2022-10-07 15:42:02 +02:00
Daniel - bc3ab8b901
Fix template copy mechanism when template is in other buffer
Forgot to switch buffer when marker in other buffer is given.
2022-10-03 10:11:17 +02:00
Daniel - 12b001221c
Fix workload report in case of time range with individual timestamps
Simply replacing the first and last characters of a timestampt with `[` and `]`
is not sufficient when a time range is given with a start timestamp and an end
timestamp, because then the result would be something like `[2022-09-30 Fri
08:00>--<2022-09-30 Fri 09:00]`.  So let's replace all `<` with `[` and all `>`
with `]`, just to be save.
2022-09-30 14:54:30 +02:00
Daniel - befcf95d1f
Include deadlines in agenda time grid effort summary
When deadlines are listed on the time grid because they are due, their effort
should also be considered in the effort summary, shouldn't it?
2022-09-23 15:47:45 +02:00
Daniel - f4f69b34c7
Add first version of workload overview report
This report will list the incremental planned workload between a given time
range using a given increment.  This way, one may better at finding time to
schedule new tasks coming in.

The current implementation might be slow, because it's calling a complete
parsing process for each step in the overview report.  One could instead think
about calling it only once and then disecting the individual tasks for when they
are planned specifically.  But before we dive in these complications, let's
frist see whether the report is worth it.
2022-09-17 10:17:25 +02:00
Daniel - 5396c7c37f
Fix typo in workload report timestamp extraction 2022-09-15 10:22:27 +02:00
Daniel - 257c2c815d
Convert active timestamps in workload report into inactive ones
Otherwise, agenda views get mixed up.
2022-09-10 09:55:55 +02:00
Daniel - e5bad8b847
Allow entries in workload report to be sorted 2022-09-10 09:40:32 +02:00
Daniel - 735570d7c0
Include various timestamps in workload report
This should make it easier to decide which entries could be moved in case too
much work is planned for the upcoming days.
2022-09-10 09:25:37 +02:00
Daniel - cbd088977e
Update docstring for workload report 2022-09-10 09:17:41 +02:00
Daniel - 2e895a23fa
Allow nil dates in workload report to ignore those constraints
Emacs Lisp is fun :)
2022-09-10 09:12:02 +02:00
Daniel - 2616693233
Allow custom org-ql filter expression in workload report
Nice!
2022-09-08 18:37:42 +02:00
Daniel - 5ab5ec6aec
Format links in workload report to not include links themselves
Standard.
2022-09-07 18:06:36 +02:00
Daniel - 88a0d85006
Handle unset efforts in workload report 2022-09-07 17:41:09 +02:00
Daniel - 2e09ef6c9e
Add workload report functionality
This special kind of dynamic block inserts all planned tasks between two dates
and sums up it's efforts.  This could help in deciding what additional tasks to
accept or what dates to promise for completion of new tasks.
2022-09-06 18:34:12 +02:00
Daniel - 8b97b092c4
Allow to customize whether the eshell prompt contains the git state
Since all of this is slow on Windows, it's better to be able to disable it.

Sigh.
2022-08-31 18:43:35 +02:00
Daniel - 2b7960d427
Do not rely on / file separator in eshell git prompt 2022-08-30 19:09:10 +02:00
Daniel - 263d1af073
Try to avoid eshell git prompt calls when inside a git directory
Not sure whether this is really the right way to do it.
2022-08-30 19:06:32 +02:00
Daniel - 437ce6daff
Fix errors in eshell prompt function
To determine whether a merge is in progress, do not check in the current
directory for .git/MERGE_HEAD, but do this in the repository directory.

When computing `base-dir`, take the whole non-directory part, not just the
basename; otherwise directories like .emacs.d will get the final `.d` get
stripped off.
2022-08-30 18:51:29 +02:00
Daniel - 584480bd53
Add state information to eshell git prompt 2022-08-29 18:59:06 +02:00
Daniel - 4e25b535ca
Fix search logic when jumping to first non-finished checkbox
Also stay put when no open checkbox is found, i.e., do not move to the end of
the subtree.
2022-08-29 17:58:02 +02:00
Daniel - 5479efabee
Add function to jump to first open checkbox in subtree
Still needs a nice key binding.
2022-08-28 19:07:51 +02:00
Daniel - c174080d4a
Restyle git branch information in eshell prompt
Just an idea.
2022-08-27 16:38:55 +02:00
Daniel - 925a55de1e
Include base directory of current git repository in eshell prompt
This allows to see of which git repository the current working directory is part
of.

This is also included in Howard Abrams configuration, but he instead determines
the name of the current git repository by looking at `remote.origin.url`.
However, my upstream branch is not always called `origin`, and sometimes there
is no upstream repository at all.  Using the name of the current directory (not
the whole path, though) instead seems to be a good compromise from my point of
view.
2022-08-27 16:17:14 +02:00
Daniel - a6f876d4f4
Add name of current git branch to eshell prompt
Inspired by configuration from Howard Abrams, see
https://github.com/howardabrams/dot-files/blob/master/emacs-eshell.org#special-prompt.
2022-08-27 15:57:59 +02:00
Daniel - 40ff1d3004
Update indentation in some elisp files
According to new elisp default indentation provided by
`common-lisp-indent-function`.
2022-08-05 09:15:33 +02:00
Daniel - c17a0e7f4c
Move custom ediff Dired function to utilities package
This is more in line with other utility functions.
2022-08-04 18:58:42 +02:00
Daniel - 29a5a83ae7
Add local copy of org-password-manager.el
The project is archived and no longer available from melpa, so let's keep a
local copy with us.

It might be necessary to add an extra use-package declaration with autoload
definitions, but we'll do that when it's clear it's necessary.
2022-07-22 18:30:41 +02:00
Daniel - 46d968d316
Manually insert link when invoking interruption capture template
The provided %K shortcut inserts text links an not id: links.
2022-07-22 18:21:55 +02:00
Daniel - c91a6d36db
Add helper to evaluate source blocks in subtree without confirmation 2022-07-21 21:54:35 +02:00
Daniel - 3b13921097
Change default org-ql query for db/org-backlinks to `(not (done))`
Using `(todo)` (the previous default) excluded NOTEs and TOPICs (among others)
which I am usually interested in.
2022-06-30 16:51:55 +02:00
Daniel - 39cb696fc4
Allow NOTEs as refile-targets again
This partially reverts cff8720a44, but keeps the
doc-string.

Rationale: TOPICs may contain notes which should be reviewd regularly.  Those
TOPICs should also be tagged with NOTE but could (and should) in addition
contain sub-items about concrete tasks.  In this case refiling to a NOTE should
be allowed.

Maybe limiting refiling to NOTE:TOPIC combinations would be more strict here,
but I think this complexity is not (yet) worth it.
2022-06-29 16:51:19 +02:00
Daniel - f3186b45f7
Allow limiting number of parent ascents when listing backlinks
Sometimes only the backlinks to the items itself might be interesting, or
backlinks to the current item and its direct parent.  To allow for easy
insertion of dynamic backlink blocks in those cases as well, include a
:parent-depth parameter.  The default value of nil means no limit is imposed, as
has been the case until now.
2022-06-20 18:01:11 +02:00
Daniel - e2181fa87a
Add helper function to replace variables in strings
Only a thin but hopefully helpful wrapper around `replace-regexp-in-string`.
2022-06-13 21:15:49 +02:00
Daniel - 1ac4e44f86
Silence some flycheck warnings 2022-06-13 21:06:44 +02:00
Daniel - 731039e84f
Add missing semicolon
Consistency above all!
2022-06-13 21:06:30 +02:00
Daniel - cff8720a44
Exclude NOTE entries in main org file as refile targets
The idea is that those entries represent project notes which should not get
tasks refiled as sub-items (sub-headings to structure these notes are fine,
though, and must be added directly).  To connect tasks with project notes, use
links and backlinks instead.

This helps to prevent accidental refiling of tasks under notes and loosing them
there.  A drawback is that `C-u org-refile` won't list notes as visiting targets
anymore; for this, use imenu instead.
2022-06-11 21:17:57 +02:00
Daniel - 7e2860a9d9
Try to increase readability of db/org-backlinks implementation
Mostly making use of pcase-*, but I am not quite sure whether the `(,foo . ,bar)
syntax really helps …

Also adjusted some comments and some formatting.
2022-06-11 09:25:25 +02:00
Daniel - b03a8f9517
Visually separate different groups of priorities in backlinks dblock
Use an hline for this, should increase readability.
2022-06-11 09:10:17 +02:00
Daniel - 10e01d4b3b
Transpose output of backlink dynamic block to emphasize backlinks
We are interested in the backlinks so we now put them first.  The backlink
targets (i.e., current item or any of its parents) are now grouped after the
priority of the item containing the backlink.
2022-06-10 18:46:22 +02:00
Daniel - b84eb291e3
Use org-ql regexp search to find backlins
This is because org-ql link queries seem to be broken when target links contain
brackets in their description.
2022-06-09 21:27:35 +02:00
Daniel - de314f6ac2
Refactor org link formatting functions to avoid duplicate code 2022-05-20 19:34:56 +02:00
Daniel - 2c01e1e09c
Do not format links directly in backlink dynamic block
They will show as links in links and will thus be mostly incomprehensible.
2022-05-20 19:22:57 +02:00
Daniel - c572451c14
Do not output headlines without backlinks in dynamic blocks 2022-05-20 19:09:39 +02:00
Daniel - 3dcbf3e800
Add deprecation marker to custom project package 2022-05-15 17:50:15 +02:00
Daniel - 05a126bfed
Introduce dynamic block to show backlinks of Org item at point
This dynamic block will list all items (including their priority) that link to
the item at point or to any of its parent items.  The use case for this is to
have a series of periodic appointments where certain topics should be
discussed (“jour fixe”), and where those topics can be referenced in those
appointments via backlinks.  However, simple backlinks to an item on a fixed
date is not sufficient here, as there might not be enough time on that day to
discuss all items.  To avoid having to manipulate all backlinks that could not
be discussed, one could simply add a reference to the parent item of all
appointments of the jour fixe series.  Using the new dynamic block introduced
here, this item will be on the list of open topics until it's closed.
2022-05-14 11:43:08 +02:00
Daniel - a36671dc61
Fix minor indentation glitch 2022-05-08 17:04:45 +02:00
Daniel - 9184756c07
Refactor function to return backlinks to item at point
Extract function to return actual list of backlinks, to later use it for
extracting backlinks of item at point and all its parents.
2022-05-05 22:08:02 +02:00
Daniel - 1b3acb5c20
Remove custom function to play radio stations
This is done via helm-emms nowadays.
2022-04-29 09:39:57 +02:00
Daniel - 8101a29d7a
Change default shortcut for "r" from scratch to refile
I am nowadays keeping my notes in the refile file, and not in the scratch
buffer.  Change the keybinding to reflect that.
2022-04-29 09:04:30 +02:00
Daniel - 92e30c7d47
Allow exclusion of individual track from favorite playlist
Filter for the tag `exclude-favorite-playlist` for this.
2022-04-23 18:57:39 +02:00
Daniel - 8f18c159d0
Code cosmetics
And not using `nconc`, as I am not quite sure whether it would also affect
`org-agenda-text-search-extra-files`.
2022-04-16 10:19:28 +02:00
Daniel - 341dec6a6a
Simplify code searching for backlinks
Reduce the conditional parts and extract common code.
2022-04-16 10:13:00 +02:00
Daniel - b670ee57f6
Only search Org buffers when querying for backlinks
It does not make sense to look in non-Org buffers for backlinks of items, but
this was indeed what happend until now: the function `db/org-get-location` only
checked whether the current buffer is associated with a file, and if so uses it
for querying the user for an item to select.  This does not make sense, as
`db/org-get-location` is supposed to return a mark to an Org item.

This is now fixed by `db/org-get-location` to also check whether the current
buffer is also an Org buffer.  It's as simple as that.
2022-04-16 10:08:11 +02:00
Daniel - 1d5f318b5b
Add function to return list of Org items linking to item at point
This function is not meant for interactive use, but instead should be used in
source blocks such as

```
(db/org-backlinks-to-item-at-point)
```

This will add a table of all items linking to the current item at point, and cut
be used in item templates, for example.

Background: I tried to achive this functionality with `org-ql` directly, but
somehow failed.  This function simply encapsulates the corresponding call to
`org-ql-query`, adding the ID property of item at point automatically.
2022-04-16 09:58:46 +02:00
Daniel - fdc32eaa6d
Clear refile cache when updating the headline of an org mode item 2022-04-02 08:56:18 +02:00
Daniel - 367c8969fc
Make going back and forth in timeline buffers more robust
Do not treat the headline as a valid line.
2022-03-31 14:22:52 +02:00
Daniel - 3c7ea1b987
Simplify extraction of timeline entries from timeline buffer 2022-03-31 13:35:12 +02:00
Daniel - e5818fdb8c
Remove 'marker text property in timelines
The marker is contained in the entry anyway, so let's use that.
2022-03-31 13:07:21 +02:00
Daniel - b80f05d49f
Add first version to move around rows in timelines 2022-03-31 13:05:09 +02:00
Daniel - 9f0a890b1c
Perform code cosmetics in timeline tools 2022-03-31 13:04:55 +02:00
Daniel - 8068107326
Stop before headline when going to previous timeline line 2022-03-31 12:41:39 +02:00
Daniel - 4428db4f82
Apply minor cosmetics 2022-03-30 08:44:15 +02:00
Daniel - cfc11ec807
Keep Org links after insertion by default
When inserting links multiple times, it's annoying to have to go back to the
original place the link points to and reinsert it into the stored link list.
Using a universal argument to toggle `org-link-keep-stored-after-insertion` is
also not an option, as I keep forgetting to use it.

Instead, by default keep all links after insertion.  To be able to handle the
growing list of links, we now provide a function `db/org-clear-stored-links` to
set the list of stored links to the empty list.
2022-03-30 08:42:06 +02:00
Daniel - 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 - 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 - 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 - 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 - 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 - 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 - 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