From a90fa1c483eaf9fa10ffc21f6bcf5ed18cb7eea1 Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 13 May 2021 19:47:02 +0200 Subject: copy url of toot at point --- lisp/mastodon-tl.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 16e1935..81c2d4b 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -808,6 +808,17 @@ webapp" (cdr (assoc 'descendants context)))))) (message "No Thread!")));) +(defun mastodon-tl--copy-toot-url () + "Copy URL of toot at point." + (interactive) + (let* ((toot (mastodon-tl--property 'toot-json)) + (boosted (mastodon-tl--field 'reblog toot)) + (url (if boosted + (cdr (assoc 'url (cdr (assoc 'reblog toot)))) + (cdr (assoc 'url toot))))) + (kill-new url) + (message "Toot copied to the clipboard."))) + (defun mastodon-tl--delete-toot () "Delete user's toot at point synchronously." (interactive) -- cgit v1.2.3