Commit Graph

1394 Commits

Author SHA1 Message Date
Daniel - 4dbc4b14c6
Split large setq init block for Org Mode into smaller parts
This makes it easier to evaluate assignments individually.
2020-01-30 15:32:38 +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 - ea4d49e99b
Delete assignment for `haskell-program-name'
Apparently, this variable is not used anymore.
2020-01-24 21:05:03 +01:00
Daniel - f4b1d80e6f
Set default mail user agent to Gnus
It has always been Gnus, but now it's official :)
2020-01-19 19:41:27 +01:00
Daniel - abfdbe41d2
Add another shortcut for standard git commit message
„Update submodule references“ is used when the commit just updates references to
updated submodules.
2020-01-19 17:22:09 +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 - bc6b1acde4
Convert `sc' shortcut to imperative mood
This shortcut is mostly used in git commit messages, and should be in imperative
mood.  Inspired by https://chris.beams.io/posts/git-commit/.
2020-01-18 15:06:12 +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 - 02299b11a4
Increase default value of the undo limit 2020-01-12 17:52:08 +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 - a63210a336
Update criteria for stuck projects
Previously, a project was not stuck if any subtask was tagged NOP (no-project).
However, this led constellations like the following to be hidden from the stuck
project list:

  * Test               :NOP:
  ** TestTest
  *** TestTestTest     :NOP:

In this case, the NOP at TestTestTest would result in hiding TestTest, which,
however, does not have any more things to do and should thus be marked stuck.
The new configuration will check NOP only at the top headline, and not at any
other sub-headlines.  For this, a property search TAGS={NOP} is necessary,
because otherwise tag inheritance would result in wrong false negatives.
2020-01-10 18:23:11 +01:00
Daniel - a4f2428e49
Don' use `dired-open' when on windows
The reason is that `dired-open--start-process' uses POSIX tools (sh, nohup) that
are not generally available on Windows.
2020-01-10 18:18:26 +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 - 66425ee2b7
Add some comments why we don't automatically update `org-agenda-files' anymore 2020-01-05 13:23:23 +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 - 9f072ebca1
Remove obsolete assignment of `org-agenda-diary-file'
We are not using this functionality anyway.
2020-01-05 12:39:23 +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 - 570fe5906b
Remove obsolete comment 2020-01-05 12:27:35 +01:00
Daniel - 7e7f8b3e13
Disable custom setter for special agenda files for now
It is no good to update `org-agenda-files' when setting those variables, only to
be overwritten by customize itself latter on.  Maybe it's better to instead have
a custom setter that updates the variable, but also checks whether the file is
also contained in `org-agenda-files', warning the user if this is not the case?
2020-01-05 12:24:01 +01:00
Daniel - 5627da7b42
Simplify output 2020-01-05 12:18:33 +01:00
Daniel - 1f2a3e70d4
Fix customize types for special org agenda files 2020-01-05 12:17:50 +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