diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-12-08 14:11:50 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-12-08 14:11:50 +0100 |
commit | 0c048e154b5599fb83a2b2b8cc2579e1eef7eb39 (patch) | |
tree | 274cb30533d5471e9996558868f8f528b26da259 /lisp | |
parent | 589868c98d23ebce4157c3d654e2b5766b414dab (diff) |
copy image caption cmd
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 97e8bc5..3ee12a9 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -263,6 +263,7 @@ types of mastodon links and not just shr.el-generated ones.") (define-key map (kbd "u") #'mastodon-tl--update) ;; keep new my-profile binding; shr 'O' doesn't work here anyway (define-key map (kbd "O") #'mastodon-profile--my-profile) + (define-key map (kbd "C") #'mastodon-tl--copy-image-caption) (define-key map (kbd "<C-return>") #'mastodon-tl--mpv-play-video-at-point) (define-key map (kbd "<mouse-2>") #'mastodon-tl--click-image-or-video) map) @@ -1290,6 +1291,15 @@ in which case play first video or gif from current toot." (message "no moving image here?")) (message "no moving image here?")))) +(defun mastodon-tl--copy-image-caption () + "Copy the caption of the image at point." + (interactive) + (if-let ((desc (get-text-property (point) 'image-description))) + (progn + (kill-new desc) + (message "Image caption copied.")) + (message "No image caption."))) + ;;; INSERT TOOTS |