Commit Graph

802 Commits

Author SHA1 Message Date
f2a62083d7
Allow overriding presence check for adding known SSH keys
Providing a non-nil universal argument to `db/load-known-ssh-keys` now readds
all known SSH keys to the current SSH agent, irregardless of whether they are
already present or not.
2023-10-01 09:51:53 +02:00
badbb85da0
Ensure org-password-manager is loaded when loading password by ID
Otherwise, `org-password-manager-default-password-wait-time` may be undefined
during runtime.
2023-08-18 19:21:14 +02:00
a6324a668d
Move custom org-password function to db-org
This is where it belongs, even if there's a warning about free variable
referencing.
2023-08-17 17:06:42 +02:00
e30ab3f260
Ensure inserting links works when the source buffer is narrowed 2023-08-15 18:11:47 +02:00
d6ffc0ba40
Avoid duplicate backlink targets in backlink reports
I am not sure yet when duplicate entries happen, but they do happen
occasionally.
2023-08-12 10:52:58 +02:00
e892a849c1
Allow to set an initial input when inserting a link to another item
This will allow to bind `db/org-add-link-to-other-item` with different initial
inputs to different keys to have often used selection directly at hand.

Setting the initial input is a bit tricky, though, because
`org-refile-get-location` does not allow to set it.  Instead, we have to
temporarily overwrite `completing-read` with the corresponding parameter set
directly.
2023-07-29 20:08:19 +02:00
c0660fe0f6
Give argument of db/org-get-location a more descriptive name
It's not a universal arguments, so calling it ARG is not only just
non-informative, but also misleading.
2023-07-29 19:50:12 +02:00
42af8216e0
Define magit-projectile synchronization function after loading magit
This is supposed to inhibit this warning:

```
Warning: Eager macro-expansion skipped due to cycle:
… => (load "db-utils.el") => (macroexpand-all (defalias 'db/sync-magit-repos-from-projectile …)) => (macroexpand (eval-when-compile …)) => (load "db-utils.el")
```

It should make calling this function also more robust.

Also updated the implementation to be more “dash-y”.
2023-07-23 17:02:15 +02:00
d8e35ab963
Fix timestamp formatting in timeline-tools for Org 9.6
The values in the variable `org-time-stamp-formats` do not contain angle
brackets anymore.  Using the function `org-time-stamp-format` is more robust
anyway and is also the official way to retrieve this format.
2023-07-21 13:10:11 +02:00
56f60e97d3
Add shortcut to jump to current clock in main Org hydra
Had forgotten about that one, sorry.
2023-07-21 10:26:44 +02:00
1d33039dde
Unfold subtree before evaluating all source blocks
This is meant to mitigate an issue with table alignment when those tables are
results of source blocks, contain links in cells and are hidden (i.e., folded):
in those circumstances, the table alignment seems to be broken, because the cell
width does not take into account that links are shorter than their textual
representation.

I am not quite sure whether this is a bug in my configuration or a bug in Org
mode itself.  The function to compute cell width is `org-string-width`, but
maybe this function does not get passed the correct input when tables are folded
and need to be aligned?
2023-07-17 20:14:09 +02:00
53a9ede65c
Marginally refactor function to add SSH keys to current agent
Does this improve readability?
2023-07-16 15:12:30 +02:00
1ec3dd24e6
Add some error-handling when adding SSH keyfiles 2023-07-16 15:12:26 +02:00
45c3b61476
Extend docstring of ssh-add utility function 2023-07-16 10:17:42 +02:00
c43291d23b
Modularize SSH key-file utility functions to increase reusability 2023-07-16 10:15:55 +02:00
82e50e8e22
Silence some byte-compiler and checkdoc warnings 2023-07-15 15:03:24 +02:00
a2f0e0ca3b
Determine whether an SSH keyfile is already loaded before loading it 2023-07-15 14:59:30 +02:00
6fb76d1efd
Decrypt SSH key password on demand and not unconditionally
This still always decrypts the password, because `ssh-add` does not check
whether the key is already present in the current agent.  This should propably
done separately before calling `ssh-add`.
2023-07-09 19:17:26 +02:00
603315e5b1
Delay computation of SSH-Key password until start of ssh-add
This is to prepare computing the password only when needed, i.e., when the key
is not already included in the running agent.  We are not there yet, though.
2023-07-09 17:55:19 +02:00
83e66e785f
Make default system open function work on Linux
I am not sure why it hasn't been working until now, and I am not sure why it
indeed does work now, but it does, and that sufficient for me – at least for
now.
2023-07-07 17:02:42 +02:00
3bb5b4481d
Search through all Org mode buffers when inserting backlinks
This seems to be fast enough, and since I often find myself aborting a current
backlink insertion query because I missed to include all Org mode buffers,
making it the default only seems to be reasonable.
2023-07-02 16:44:36 +02:00
d8a41ca0cf
Move Dired utility functions to general utility library 2023-07-01 17:02:12 +02:00
908b5f278e
Remove some byte-compiler warnings 2023-06-27 21:04:02 +02:00
ebb84f2139
Generalize SSH key adding function to additional password backends
Untested for Org password manager.
2023-06-27 20:20:28 +02:00
096f790fab
Change some code heading 2023-06-27 19:40:09 +02:00
74659e7548
Add simple convenience function to add known SSH keys
This is supposed to avoid manually inserting passwords for SSH keys when they
have expired from the local ssh-agent instance.
2023-06-27 19:40:00 +02:00
8f383bcbdb
Make checkdoc happy about db-music.el 2023-06-12 19:38:10 +02:00
4677ea74c7
Ensure number comparison when updating favorites playlist 2023-06-12 19:32:33 +02:00
9ff7c848a1
Change shortcut for interactive clock selection
This is for consistency with all other commands that use "s" to select a running
clock from the history.
2023-05-28 15:30:18 +02:00
f8caaae071
Allow adding links to Org items also in non-Org-mode buffers
The relevant use-case (for me at least) is to insert links to Org items in the
minibuffer when capturing new items.
2023-05-26 18:08:22 +02:00
113f3f4495
Fix invalid logic for nil dates in workload report
When not provided in dynamic workload reports, `start-date` and `end-date`
should be treated as unconstrainted.  However, instead dates were queried
interactively in that case, because `org-read-date` is being used to normalize
date display.  Fixed that.
2023-05-24 19:25:02 +02:00
a4712cf155
Include items in workload overview planned before given start date 2023-05-24 18:59:39 +02:00
242d5cbcba
Add function to retrieve library version
This could come in handy when checking for necessary library versions.
2023-05-18 19:07:21 +02:00
cac41d0759
Do not recenter position when jumping to current clock
This keeps the current view as it is in case it's already visible in some
buffer.
2023-05-16 18:26:14 +02:00
58e5cd3506
Jump to headline of the currently clocked item when going there
Before this change, we went to the position of the open clock, which is not
where we want to be in case no open checklist item is found.
2023-05-16 18:25:00 +02:00
0b315f44a3
Go to Org item when trying to insert checklist directly in agenda
This is expected behavior in my point of view.
2023-05-13 10:30:29 +02:00
8e192e5cfb
Downcase login name in eshell prompt
Windows sometimes likes to display the login name in all-caps, this is annoying.
2023-05-09 17:53:36 +02:00
01b5e1b8db
Fix incorrect restriction handling when inserting templates
We must widen the current restriction when searching for the template item, not
when copying the body from it.  In the latter case, `org-with-point-at` will
handle the necessary widening.
2023-05-06 18:03:14 +02:00
925cf115be
Remove ID and CUSTOM_ID properties when inserting checklist template
When the template associated with the item at point contains sub-items itself,
those may have been assigned ID or CUSTOM_ID properties.  Copying the template
would thus duplicate these properties, violating their implicit uniqueness
constraint, so we now remove those properties from the inserted checklist
template.
2023-05-06 16:54:38 +02:00
fa56dfdd4d
Ensure CHECKLIST_INSERTED_P will be inserted at original heading
When a checklist template contains headings on its own, the
`CHECKLIST_INSERTED_P` property until now would be inserted at the last heading
in this template, instead of at the heading where the template is supposed to be
inserted in the first place.  Fixed this.
2023-05-06 15:30:16 +02:00
7db9f8d56c
Fix indentation in utility library to conform to Common Lisp
This is the current indentation default.
2023-04-30 17:28:23 +02:00
28b9918325
Add utility function to create selector functions from table headers
This might be useful to work with table data from Org tables in source blocks,
maybe.

Does this exist somewhere already?
2023-04-30 17:26:56 +02:00
7bd8c0ef2b
Remove obsolete function to conditionally enable lispy
Not using this anymore.
2023-04-30 17:25:53 +02:00
b67a920780
Fix wrong search region for inserting active filter display 2023-04-29 17:35:20 +02:00
a44b7b660e
Remove obsolete function to skip tags in agenda views 2023-04-29 17:28:35 +02:00
8c9c47f6e3
Prominently display of active filters in agenda view
Displaying the current filters in the mode line alone often goes unnoticed for
me, so I need a more direct display.  Let's add it to the first structural
header.
2023-04-29 17:27:50 +02:00
2f1868da43
Only treat automatically named (e)shell buffers special
This allows to have custom named (e)shell buffers that are treated like any
other buffer, and not as the special bottom shell buffers.
2023-04-16 19:02:24 +02:00
71f07d1e8f
Remedy some flycheck and checkdoc warnings coming from db-org.el 2023-04-07 12:52:35 +02:00
347a3bf08d
Clean up personal Org utility functions
Mostly moving functions around and updating page headers.  Also removed some
obsolete functions, see updated command list for `db-org` use-package
declaration.
2023-04-07 11:49:58 +02:00
c3a96fc342
Use display-buffer when jumping to currently clocked item 2023-04-06 18:10:56 +02:00