aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-tl.el10
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