dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 80e2ebc852d16fb863224cbd68508ceb73b0bce3
parent aa5980aec403dc1bc7bbc22458c9282f04457fa1
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Sat, 14 Jun 2025 18:17:04 +0200

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:
M.config/emacs/init.el | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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)))