Commit Graph

573 Commits

Author SHA1 Message Date
Daniel - a576ef123d
Automatically update hydra for shortcuts after customization 2020-09-19 14:02:50 +02:00
Daniel - 14cfae155a
Add some documentation for custom agenda deadline listing
It should be clear why we are using this, and not the standard agenda list.
2020-09-17 16:05:20 +02:00
Daniel - 5961491f77
Replace custom imenu support use-package with builtin one
Reference: https://protesilaos.com/dotemacs/#h:cfa129a4-3394-4911-9097-4544df4e6ed9
2020-09-11 16:47:28 +02:00
Daniel - c9e84a7e28
Offer simple completion when creating external bookmarks
In dired, offer all marked files, or the currently selected file if there are
none.  Otherwise, just use the list of recently opened files as completing.

This is meant as a very simple replacement for dired+'s dired bookmarks.
2020-09-07 18:10:44 +02:00
Daniel - 03f23b11fb
Copy complete template for periodic tasks
Previously, we only copied the last element in the subtree, assuming that this
encompasses all of the content of the subtree.  However, this is not true, and
thus we have to do something more elaborate.  Now, starting from the end of the
subtree, we go up all elements in the subtree until we reach either the headline
or a drawer.  Everything in between is copied as template to the current
location.
2020-09-01 16:23:28 +02:00
Daniel - 1ba91b3271
Introduce dedicated variable for main Org Mode file
The shortcut in the frequently-used menu now points there, and not anymore to
the dedicated home and work files.  If only a single main Org Mode file is used,
this variable should be sufficient.
2020-08-27 12:16:54 +02:00
Daniel - 77ca64de3b
Add shortcuts for main Org Mode files
Usually, only one of them is used.  Maybe one day I have to replace the two
files (or, more precisely, the custom variables pointing to them) by a single
one.  But then, having two files, and also two shortcuts, also remindes me of
whether I am at home or at work, and that's quite significant, isn't it?
2020-08-27 12:07:18 +02:00
Daniel - 88e0a5021d
Add custom function for keyboard-quit
This version should also quit the minibuffer even if not selected.  Found at
https://with-emacs.com/posts/tips/quit-current-context/.
2020-08-26 10:30:25 +02:00
Daniel - 845d5d137c
Add function to generate playlists from git-annex metadata
This had been done manually from the shell until now.
2020-08-15 15:02:06 +02:00
Daniel - 772ee43c2c
Add custom function to play radio stations 2020-08-12 21:57:48 +02:00
Daniel - bc3e2e875f
Remove duplicate entries when setting Gnus' select methods 2020-08-01 10:11:47 +02:00
Daniel - 5707c9233e
Remember to fix setting `gnus-secondary-select-methods'
If `db/mail-accounts' specifies accounts multiple times, or a definition for
some of these accounts is already present in `db/other-gnus-accounts', accounts
will be added multiple times with the current implementation.  Apparently, Gnus
does not seem to care, but it would be better to have this fixed properly.
2020-07-31 18:09:21 +02:00
Daniel - a69d837171
Make automatic IMAP accounts fetch articles partially by default 2020-07-31 18:08:04 +02:00
Daniel - e38ae56584
Rework logic of `db/run-or-hide-shell'
It's a bit clearer now what the function is doing when ARG is given, I hope.  It
also turns out that switching to the current working directory does not make
much sense when we are in the shell buffer, because CWD is then just the, well,
current directory.  The original logic used to CWD of the previous buffer (by
closing the shell buffer and immediately reopening it), but that's actually not
what the function is supposed to be doing, is it?
2020-07-31 16:18:35 +02:00
Daniel - 25abde2d9c
Rewrite `db/run-or-hide-shell' to mimic EShell counterpart 2020-07-31 15:58:37 +02:00
Daniel - 6cca84cdb5
Add standard shortcut for `org-clock-goto'
That even works with C-u, wohoo!
2020-07-26 10:23:06 +02:00
Daniel - b49018129b
Remove trailing whitespace when copying templates for periodic tasks 2020-07-18 19:13:04 +02:00
Daniel - ac815a06f1
Close window when hiding current shell
For eshell we do the same.
2020-07-12 13:00:28 +02:00
Daniel - 4084e0ccae
Do not refile to elements of periodic tasks
If separate things should be done, generate a separate item for it, or leave
some note at the corresponding series element.  Periodic tasks are quite rigid
and should not be used for collecting individual subtasks.
2020-07-04 11:43:19 +02:00
Daniel - edf9afa68f
Readd hydra for shortcuts
Turns out I am using those shortcuts indeed, but forget about it ;)
2020-07-01 21:28:55 +02:00
Daniel - d1c4ad5b5d
Remove unused `db/org-clock-current-task' 2020-07-01 17:16:39 +02:00
Daniel - 4f063c5e6b
Fix misinterpretation of percent sign in org-clock hydra 2020-07-01 17:15:13 +02:00
Daniel - 72768b659f
Print result of `db/ntp-to-time' when called interactively
Otherwise no result is displayed.
2020-06-27 12:27:42 +02:00
Daniel - 5b6dcfe8d2
When switching themes, only do so temporarily
If changes need to be done permanently, customize `custom-enabled-themes'.
2020-06-27 11:16:49 +02:00
Daniel - 2e229c5af9
Explicitly define setter functions for timeline tooling
This is more explicitly and allows for more flexiblity.  Let's hope the
performance impact is not prohibitive, though.
2020-06-27 10:38:13 +02:00
Daniel - dd27018420
Rename main music hydra and move it to `db-music'
The `db-music' package is supposed to be an abstract interface to music
functionality, and should thus define the main hydra for this.  Moreover, the
hydra should not contain „emms“ in it's name, although it's using only EMMS
functions.

It's not clear whether EMMS will every be replaced by some other backend, but
it's nicer to have a (more or less) clear separation between user frontend and
implementation backend.
2020-06-27 10:16:53 +02:00
Daniel - fa1344bf4e
Silence another byte-compiler warning 2020-06-27 10:12:46 +02:00
Daniel - b5d7b57b27
Use `autoload instead' of `declare-function' 2020-06-27 10:11:13 +02:00
Daniel - 6183e008d7
Remove unused `hydra-shortcuts'
The idea of having a hydra to access frequently used features is certainly nice,
but quite hard to achive when one wants to redefine the hydra every time
`db/frequently-used-features' changes.  Regrettably, there are not „ephemeral
hydras“ that are created every time one would like to access it.  Therefore, the
shortcuts hydra is removed for now, but may come back again when we have found a
better way to handle its dynamic nature.
2020-06-27 10:08:39 +02:00
Daniel - c96083c871
Declare `w32-shell-execute' to silence byte-compiler 2020-06-27 09:42:16 +02:00
Daniel - f1932e7032
Fix precision error in `db/ntp-to-time'
A curcial step in the conversion, namly the computation of the actual time from
the seconds since the epoch, had been conducted with too little precision.  Now
the precision is fixed to a high value throughout the whole computation, and the
tests succeed again.
2020-06-27 09:35:31 +02:00
Daniel - b5ed51d8e8
Silence most byte-compiler warnings in `db-utils' 2020-06-27 09:03:23 +02:00
Daniel - 46d9973146
Move last Org Mode utility function from `db-utils' to `db-org' 2020-06-27 08:56:53 +02:00
Daniel - 0583c08cda
Move Org Mode utilities to `db-org'
`db-utils', the original place, is used for general purpose utility functions.
2020-06-26 23:21:37 +02:00
Daniel - 5009eb39f9
Move eshell popup function to `db-eshell'
That's where it belongs.
2020-06-26 23:08:00 +02:00
Daniel - 32b424de24
Add missing require for `timeline-tools' 2020-06-26 23:02:09 +02:00
Daniel - 501060c05a
Silence byte-compiler in `db-eshell' 2020-06-26 22:59:46 +02:00
Daniel - 60808bee7d
Fix requirements for `db-emms' 2020-06-26 22:50:01 +02:00
Daniel - f163e925b8
Silence byte-compiler in custom mail handling code 2020-06-26 22:49:44 +02:00
Daniel - 7dbe2445ac
Remove obsolete cache playlist functionality
It has been replaced by a git-annex powered backend long ago.
2020-06-26 22:29:44 +02:00
Daniel - 8bb2d69fb3
Add missing requires for `db-music' 2020-06-26 22:28:15 +02:00
Daniel - 755fb23e2b
Replace `org-get-tags-at' by 'org-get-tags' 2020-06-26 22:17:25 +02:00
Daniel - 7c8b28c9bc
Move most `defcustom' declarations to `db-customize' 2020-06-26 22:07:39 +02:00
Daniel - b2709c0187
Add missing require for `db-org' 2020-06-26 22:07:14 +02:00
Daniel - 1cad9cc186
Remove obsolete `db/cmp-date-property' function 2020-06-26 22:00:18 +02:00
Daniel - 336ee9d7c4
Incorporate some suggestions from the byte compiler 2020-06-26 21:59:25 +02:00
Daniel - a404f9a8c2
Add missing `save-restriction' to template copy function 2020-05-24 16:46:24 +02:00
Daniel - fba18ca527
Add helper function to insert templates of periodic tasks
A periodic task is a task tagged with :PERIODIC:, and whose first child is an
item called "Template".  Following the template are the instances of the
periodic tasks, which constitute the actual things to do and which can be
scheduled independently of each other.  Whenever such an instance is due, the
template of the periodic task is supposed to be copied to the instance as a
first step.  This copying can be done manually, but of course doing it
automatically is easier.  The new function added in this commit represents a
first try to add such an automatism.
2020-05-23 16:25:13 +02:00
Daniel - 004ac490ef
Reintroduce helper functions to quickly switch between themes 2020-04-17 18:58:18 +02:00
Daniel - 7a78446a92
Make capitalization a bit more consistent 2020-04-17 18:50:01 +02:00
Daniel - bec4bc13a2
Add new PERIODIC tag for recurring tasks
As described in [1], we are sometimes representing recurring tasks as lists of
single tasks plus a recurring task to create new instances once in a while.  All
of this is grouped under a common headline, and those headlines should be marked
with PERIODIC to inhibit automatic clock-in.

[1]: https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/
2020-01-31 10:41:08 +01:00
Daniel - bea691cc9b
Move timeline minor mode activation to mode definition 2020-01-26 21:08:55 +01:00
Daniel - 8d9bdc39de
Transform timeline even when extracting it from the buffer
This reenables automatic gap filling in case it has been configure with
`timeline-tools-filter-functions', but somehow breaks undo of killing in the
timeline buffer.  The problem seems to be that undoing a kill only restores the
killed line, but not the original line entries of the lines right before and
after the lined that had been killed.  In this way, the timeline of the buffer
has overlapping entries, resulting in odd behavior.

The problem is not quite understood yet, but it seems to be that undo does not
notice the changes to the surrounding lines (maybe because they have not been
done by text editing functions).
2020-01-26 21:01:13 +01:00
Daniel - caea47fc5f
Add standard shortcut for redrawing a timeline buffer
I keep hitting "g" so often that it has to work to not confuse me any longer.
2020-01-26 20:55:10 +01:00
Daniel - cccaf5bf4b
Move up timeline functions for moving the cursor
They are more fundamental than other functions, and should thus be closer to the
top.
2020-01-26 20:54:34 +01:00
Daniel - 619e5bdcae
No longer store timeline of current buffer in separate variable
This does not play nicely with undo, because undo won't track changes to local
variables.  Thus, if we every want to have a working undo in timeline buffers,
the timeline needs to be saved as something textual.  Luckily, we already store
each entry of the timeline as a text property in the timeline table, and from
now on we will extract the timeline from there whenever we need it.

Undo is still not working fully yet, there are some oddities that need to be
addressed first.
2020-01-26 20:45:44 +01:00
Daniel - 85cfd25097
Delete feature to remove short entries
Haven't used it much anyway, and this will not work anymore when we no longer
explicitly store the current timeline of the buffer.
2020-01-26 20:40:36 +01:00
Daniel - be43c611d9
Introduce explicit force parameter for timeline reparsing 2020-01-26 20:16:57 +01:00
Daniel - 3f5ae63ea4
Reparse timeline when buffer-local variable is nil
This removes a lot of duplicate code.
2020-01-26 19:50:29 +01:00
Daniel - 3fc25e3cad
Require customizations in utilities package
The function may make use of some custom variables, and this way we make sure
they are there when needed.
2020-01-19 17:21:32 +01:00
Daniel - 38f7fd7c88
Move some more custom org mode link handlers to `db-org'
This is where they belong, nowhere else.
2020-01-19 17:21:14 +01:00
Daniel - c566908deb
Let the org mode RFC link handler cache its documents
RFC documents do not change over time.  The custom org mode link handler
`db/org-rfc-open' now makes use of this by downloading RFC documents to
`db/rfc-cache-path' (if defined) and opening the files locally.  If
`db/rfc-cache-path' is not defined, the RFC is opened in an external browser as
before.

This allows to keep a selection of used RFC documents locally on the filesystem
for future reference, without the need to retrieve them again from the IETF.

Since this is all org mode related, the handler now also resides in `db-org'
instead of `db-utils'.
2020-01-19 17:17:47 +01:00
Daniel - 31bde05efa
Add missing word in comment
Sorry, but need to have it there …
2020-01-18 10:25:40 +01:00
Daniel - 66eb5e3da4
Fix missing handling of optional NTP format string 2020-01-18 10:24:49 +01:00
Daniel - c86051ba22
Add obvious test for NTP conversion
This test could not have been added before, because conversion was not
guaranteed to work for dates before the unix epoch.  It now is, and we finally
can check the start of the NTP epoch! :)
2020-01-18 10:20:21 +01:00
Daniel - 010f3cec86
Reimplement NTP conversion using Calc
The previous implementation made use of `encode-time', which is not
guaranteed to work with times before the unix epoch.  Indeed, on at least one
Windows machine, the corresponding function `db/ntp-to-time' could not handle
such dates.  However, Calc can handle those independently of `encode-time',
and `db/ntp-to-time' has now been reimplemented in terms of the corresponding
Calc functions.

All (both) tests still pass.
2020-01-18 10:17:54 +01:00
Daniel - 158a232cfe
Move some personal customization variables to dedicated package 2020-01-11 12:35:53 +01:00
Daniel - f4b55ad777
Add tests for NTP time conversion 2020-01-11 10:13:30 +01:00
Daniel - 9ab5d55237
Remove visibility cycling from general clock mapping function
It's only necessary when editing the buffer, not when only traversing it.  Moved
it to the only function where this is actually done, and added a comment to the
docstring of `timeline-tools-map-clocklines' to remind everyone that editing the
buffer through this function may yield funny surprises :)
2020-01-10 18:12:50 +01:00
Daniel - e966edd950
Use `org-show-all' to, well, show all
Using `org-cycle' may result in hooks being run, depending on where point is.
This may cause undesired and highly surprising behavior.
2020-01-10 18:10:07 +01:00
Daniel - df2464ce5b
Check input of NTP conversion function 2020-01-09 21:35:23 +01:00
Daniel - 57107c0c75
Prettify docstring 2020-01-09 21:35:12 +01:00
Daniel - 52de03a8c0
Note simple test case for NTP conversion function 2020-01-09 21:34:55 +01:00
Daniel - 97e3b4da13
Fix computation of seconds in NTP conversion function 2020-01-09 21:34:38 +01:00
Daniel - c16500344c
Globally require `dash' 2020-01-09 21:02:23 +01:00
Daniel - b92d5e7819
Allow spaces in NTP time strings 2020-01-09 21:02:18 +01:00
Daniel - f44ed54318
Fix handling of dates before Unix epoch in NTP conversion 2020-01-09 20:58:01 +01:00
Daniel - d6690d27f9
Fix docstring of `db/ntp-to-time' 2020-01-09 20:57:13 +01:00
Daniel - a710238694
Use correct number of seconds between 1900-01-01 and the epoch 2020-01-09 20:56:50 +01:00
Daniel - 6f856c61b6
Properly declare ignored variable 2020-01-05 14:42:13 +01:00
Daniel - 95555dd7c1
Add missing require for timeline-tools 2020-01-05 14:32:38 +01:00
Daniel - 4b7e02ccd6
Trying to make test for `timeline-tools' independent of locale 2020-01-05 14:32:35 +01:00
Daniel - 243e579973
Check whether special org-mode files are included in agenda when displaying it 2020-01-05 13:36:37 +01:00
Daniel - ec83430a70
Remove `db-update-org-agenda-files'
It's not used anymore and won't ever work as intended.
2020-01-05 13:06:50 +01:00
Daniel - bbfea51fca
Fix check in `db/export-diary' for empty files
This is a result of changing the types of the special org files.  Now a typed
language would be great …
2020-01-05 12:36:56 +01:00
Daniel - 5627da7b42
Simplify output 2020-01-05 12:18:33 +01:00
Daniel - 541940d7dc
Fix glitch in custom setter for `org-agenda-file' 2020-01-05 12:17:37 +01:00
Daniel - e234912180
Inline `org-agenda-file-to-front'
This allows to use the value for the new file directly, instead of opening a
buffer for it.
2020-01-05 12:10:31 +01:00
Daniel - cf14629099
Remove obsolete debugging output 2020-01-05 11:57:43 +01:00
Daniel - bd65533b97
Update custom setter for special org agenda files
The setter will now complain if the file to be added to `org-agenda-files' does
not exist and is not readable.  It also now uses the proper functions from `org'
to update `org-agenda-files'.
2020-01-05 11:56:05 +01:00
Daniel - 9e0338e683
Dynamically create hydra from `db/frequently-used-features' 2019-12-20 16:12:11 +01:00
Daniel - a0abe9fc4e
Explicitly require `face-remap' before resizing fonts 2019-12-20 15:28:09 +01:00
Daniel - e63356ad06
Add descriptions to clocking hydra 2019-12-20 15:17:05 +01:00
Daniel - 4621ed98f0
Require `gnutls' when setting `gnutls-trustfiles' 2019-12-20 08:45:44 +01:00
Daniel - 485b7b84d3
[Utils] Using `dired-open-file' doesn't work for bookmarks
Pity!
2019-12-13 15:28:46 +01:00
Daniel - 6f375c301f
[Util] Add helper to add bookmarks to be opened by `dired-open-file' 2019-12-13 15:05:44 +01:00
Daniel - 2bc02703eb
[Org] Change title of all active frames when entering new task 2019-12-05 17:09:49 +01:00
Daniel - 2f3844856b
[eshell] Fix prompt coloring 2019-10-05 17:57:32 +02:00
Daniel - e6a5a8d9cd
[Helm] Move code of ‘db/helm-shortcuts’ directly to init.el
This makes ‘db-helm’ obsolete again (already after one commit!).  The function
to extract all files from ‘db/important-path’ has also been dropped in favor of
the standard ‘directory-files-recursively’.  It’s not clear yet whether this
will also work on Windows, though.
2019-08-31 12:02:02 +02:00
Daniel - bbad4b7fd4
[Helm] Move code for ‘db/helm-shortcuts’ to different file
This keeps ‘db-utils’ require-clean.
2019-08-31 11:39:04 +02:00