aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-19 15:53:52 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-19 15:53:52 +0100
commit82d3869fb24fc2e4976604e53b456f0a57bab0c6 (patch)
tree2a78dbae51eca500d58906817dc8f3838973bf7c
parent6575858c101a7536a265c89534137692e5488265 (diff)
propertize list accounts so -at-point list funs work there (rough)
-rw-r--r--lisp/mastodon-tl.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index b191b3d..c024358 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1445,7 +1445,7 @@ If ID is provided, use that list."
(interactive)
(let* ((list-names (unless id (mastodon-tl--get-lists-names)))
(name-old (if id
- (word-at-point :no-properties)
+ (get-text-property (point) 'list-id)
(completing-read "Edit list: "
list-names)))
(id (or id (mastodon-tl--get-list-id name-old)))
@@ -1557,17 +1557,20 @@ If ID is provided, delete that list."
(accounts (mastodon-tl--accounts-in-list id)))
(insert
(propertize list-name
- 'list t
- 'list-name list-name
- 'list-id id
- 'keymap mastodon-tl--list-name-keymap
'byline t ; so we nav here
'toot-id "0" ; so we nav here
'help-echo "RET: view list timeline, d: delete this list, \
a: add account to this list, r: remove account from this list"
'face 'link) ; '((:underline t :inherit success)))
- "\n\n")
- (mastodon-search--insert-users-propertized accounts)))
+ "\n\n"
+ (propertize
+ (mapconcat #'mastodon-search--propertize-user accounts
+ " ")
+ ;; (mastodon-search--insert-users-propertized accounts)
+ 'list t
+ 'keymap mastodon-tl--list-name-keymap
+ 'list-name list-name
+ 'list-id id))))
(defun mastodon-tl--get-users-followings ()
"Return the list of followers of the logged in account."
@@ -1586,7 +1589,7 @@ a: add account to this list, r: remove account from this list"
If ID is provided, use that list."
(interactive)
(let* ((list-name (if id
- (word-at-point :no-properties)
+ (get-text-property (point) 'list-id)
(completing-read "Add account to list: "
(mastodon-tl--get-lists-names) nil t)))
(list-id (or id (mastodon-tl--get-list-id list-name)))
@@ -1617,7 +1620,7 @@ If ID is provided, use that list."
If ID is provided, use that list."
(interactive)
(let* ((list-name (if id
- (word-at-point :no-properties)
+ (get-text-property (point) 'list-id)
(completing-read "Remove account from list: "
(mastodon-tl--get-lists-names) nil t)))
(list-id (or id (mastodon-tl--get-list-id list-name)))