Commit Graph

167 Commits

Author SHA1 Message Date
Daniel - 42074f7d6a
Fix some docstring formatting 2024-03-09 16:30:08 +01:00
Daniel - dbd19d0da8
Extend candidate list for custom grep-files function with history
It might be useful to actually see the history entries, so let's
explicitly include them in the candiate list.
2024-03-09 16:18:51 +01:00
Daniel - 4124bc28d5
Provide default value for custom grep-files pattern query function 2024-03-09 16:16:03 +01:00
Daniel - f6c40ad619
Fix wrong candiate specification in custom grep-read-files function
Somehow mixed up the order, I suppose.
2024-03-09 13:45:49 +01:00
Daniel - ed0286dc95
Include last modification time when adding custom-type bookmarks 2023-11-27 18:02:14 +01:00
Daniel - 15d202340f
Remove obsolete part of a function docstring 2023-11-27 17:46:12 +01:00
Daniel - 11ae275bb8
Do not use closures as handlers for custom bookmark types
Using closures leads to errors when using standard bookmark functions,
as they seem to expect a symbol as handler.
2023-11-27 17:35:33 +01:00
Daniel - 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
Daniel - 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
Daniel - 53a9ede65c
Marginally refactor function to add SSH keys to current agent
Does this improve readability?
2023-07-16 15:12:30 +02:00
Daniel - 1ec3dd24e6
Add some error-handling when adding SSH keyfiles 2023-07-16 15:12:26 +02:00
Daniel - 45c3b61476
Extend docstring of ssh-add utility function 2023-07-16 10:17:42 +02:00
Daniel - c43291d23b
Modularize SSH key-file utility functions to increase reusability 2023-07-16 10:15:55 +02:00
Daniel - 82e50e8e22
Silence some byte-compiler and checkdoc warnings 2023-07-15 15:03:24 +02:00
Daniel - a2f0e0ca3b
Determine whether an SSH keyfile is already loaded before loading it 2023-07-15 14:59:30 +02:00
Daniel - 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
Daniel - 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
Daniel - 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
Daniel - d8a41ca0cf
Move Dired utility functions to general utility library 2023-07-01 17:02:12 +02:00
Daniel - 908b5f278e
Remove some byte-compiler warnings 2023-06-27 21:04:02 +02:00
Daniel - ebb84f2139
Generalize SSH key adding function to additional password backends
Untested for Org password manager.
2023-06-27 20:20:28 +02:00
Daniel - 096f790fab
Change some code heading 2023-06-27 19:40:09 +02:00
Daniel - 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
Daniel - 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
Daniel - 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
Daniel - 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
Daniel - 7bd8c0ef2b
Remove obsolete function to conditionally enable lispy
Not using this anymore.
2023-04-30 17:25:53 +02:00
Daniel - 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
Daniel - 47d7e31800
Let display-buffer handle window placement for shells
This provides the same functionality, but makes it more configurable.
2023-02-13 13:22:51 +01:00
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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - e4f02647a2
Refactor code to update magit's repository list to separate function
This allows easier updates of this list, without having resort to executing the
corresponding code manually.  In the future, we could even update that list
automatically by attaching the new function to some of projectile's hooks or
something.
2021-01-17 09:15:01 +01:00