diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2025-06-14 18:17:04 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2025-06-14 18:17:04 +0200 |
| commit | 80e2ebc852d16fb863224cbd68508ceb73b0bce3 (patch) | |
| tree | d4c51dc0dce30d52c93b7119ed9934caf4735256 /.config | |
| parent | aa5980aec403dc1bc7bbc22458c9282f04457fa1 (diff) | |
| download | dotfiles-80e2ebc852d16fb863224cbd68508ceb73b0bce3.tar.xz | |
Add command to send character to clipboard
Useful to re-purpose an Emacs session as a severely oversized Unicode
character picking widget.
Bind to uppercase 'C' rather than 'c' since $DAYJOB config uses the
latter for 'c'ite (kill a region with added '> ' markers).
Diffstat (limited to '.config')
| -rw-r--r-- | .config/emacs/init.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 7ce7b11..3fe49c6 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -200,6 +200,10 @@ Raise a user error if the command fails. Heed `my/run-strip-newline'." See `my/run' for details, e.g. status handling and output massaging." (my/kill (apply 'my/run program args))) +(defun my/kill-char (c) + (interactive (list (read-char-by-name "Codepoint? " t))) + (my/kill (string c))) + (defun my/kill-date (date format) (interactive (if current-prefix-arg @@ -306,7 +310,8 @@ list and require no escaping." (my/define-prefix-command my/kill-map "Keymap for adding things to the kill ring." - '(("d" my/kill-date) + '(("C" my/kill-char) + ("d" my/kill-date) ("f" my/kill-filename) ("|" my/kill-pipe-region) ("!" my/kill-shell))) |
