[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 7bcc81748d 03/13: refactor toot-url and copy-toot
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 7bcc81748d 03/13: refactor toot-url and copy-toot-url |
Date: |
Thu, 12 Oct 2023 10:01:26 -0400 (EDT) |
branch: elpa/mastodon
commit 7bcc81748d5a7c2ef4b6460500a9eb1ea3ddca18
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>
refactor toot-url and copy-toot-url
---
lisp/mastodon-toot.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index f46fc6deec..f819a16e23 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -507,14 +507,18 @@ With FAVOURITE, list favouriters, else list boosters."
If the toot is a fave/boost notification, copy the URL of the
base toot."
(interactive)
- (let* ((toot (or (mastodon-tl--property 'base-toot)
- (mastodon-tl--property 'toot-json)))
- (url (if (mastodon-tl--field 'reblog toot)
- (alist-get 'url (alist-get 'reblog toot))
- (alist-get 'url toot))))
+ (let* ((url (mastodon-toot--toot-url)))
(kill-new url)
(message "Toot URL copied to the clipboard.")))
+(defun mastodon-toot--toot-url ()
+ "Return the URL of the base toot at point."
+ (let* ((toot (or (mastodon-tl--property 'base-toot)
+ (mastodon-tl--property 'toot-json))))
+ (if (mastodon-tl--field 'reblog toot)
+ (alist-get 'url (alist-get 'reblog toot))
+ (alist-get 'url toot))))
+
(defun mastodon-toot--copy-toot-text ()
"Copy text of toot at point.
If the toot is a fave/boost notification, copy the text of the
- [nongnu] elpa/mastodon updated (708aaa06b6 -> 9a400d33a5), ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 2f45c1d4b1 07/13: expand-content-warnings custom: don't quote server symbol, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 0932c7abae 08/13: click to play video, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon d2dae4643c 04/13: require shr for http.el, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon f965cc1f17 01/13: add settings check to mode-hook-fun, fix when check for hl-current, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 5ab025352d 10/13: improve handling of click to play: if image, call shr-browse-image, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 7bcc81748d 03/13: refactor toot-url and copy-toot-url,
ELPA Syncer <=
- [nongnu] elpa/mastodon c3b649d8bd 09/13: index update, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 02bcd3de9f 12/13: add rough hometown user statuses url regex, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 9a400d33a5 13/13: bump, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 95783691ab 06/13: inhibit-read-only typo fix, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 0d0b5da805 11/13: toot-url-regex: \\> not \\b at end, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 3442dd296a 05/13: doctring for http--post, ELPA Syncer, 2023/10/12
- [nongnu] elpa/mastodon 1a07051ea3 02/13: add mastodon-tl--expand-content-warnings. FIX #488., ELPA Syncer, 2023/10/12