aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-23 12:51:36 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-23 12:53:15 +0100
commitebefa1141e0ebd2a2d217e4b5b00720d8c60530a (patch)
tree597ec1783bffb9881533a25f6babad0f39175b4e
parent6aa934389c6644c84196f75ee51f294b5264ef6d (diff)
move add account to list profile to profile.el, + readme
-rw-r--r--README.org120
-rw-r--r--lisp/mastodon-profile.el11
-rw-r--r--lisp/mastodon-tl.el16
3 files changed, 77 insertions, 70 deletions
diff --git a/README.org b/README.org
index 8eb9242..a757706 100644
--- a/README.org
+++ b/README.org
@@ -107,65 +107,69 @@ take place if your =mastodon-token-file= does not contain =:client_id= and
**** Keybindings
-|---------------+-----------------------------------------------------------------------|
-| Key | Action |
-|---------------+-----------------------------------------------------------------------|
-| | *Help* |
-| =?= | Open context menu if =discover= is available |
-|---------------+-----------------------------------------------------------------------|
-| | *Timeline actions* |
-| =n= | Go to next item (toot, notification) |
-| =p= | Go to previous item (toot, notification) |
-| =M-n=/=<tab>= | Go to the next interesting thing that has an action |
-| =M-p=/=<S-tab>= | Go to the previous interesting thing that has an action |
-| =F= | Open federated timeline |
-| =H= | Open home timeline |
-| =L= | Open local timeline |
-| =N= | Open notifications timeline |
-| =@= | Open mentions-only notifications timeline |
-| =u= | Update current timeline |
-| =T= | Open thread for toot under =point= |
-| =#= | Prompt for tag and open its timeline |
-| =A= | Open author profile of toot under =point= |
-| =P= | Open profile of user attached to toot under =point= |
-| =O= | View own profile |
-| =U= | update your profile bio note |
-|---------------+-----------------------------------------------------------------------|
-| | *Other views* |
-| =S= | search (posts, users, tags) (NB: only posts you have interacted with) |
-| =I=, =c=, =d= | view, create, and delete filters |
-| =R=, =a=, =j= | view/accept/reject follow requests |
-| =G= | view follow suggestions |
-| =V= | view your favourited toots |
-| =K= | view bookmarked toots |
-| =X= | view/edit/create/delete lists |
-|---------------+-----------------------------------------------------------------------|
-| | *Toot actions* |
-| =t= | Compose a new toot |
-| =c= | Toggle content warning content |
-| =b= | Boost toot under =point= |
-| =f= | Favourite toot under =point= |
-| =k= | toggle bookmark of toot at point |
-| =r= | Reply to toot under =point= |
-| =v= | Vote on poll at point |
-| =C= | copy url of toot at point |
-| =C-RET= | play video/gif at point (requires =mpv=) |
-| =e= | edit your toot at point |
-| =E= | view edits of toot at point |
-| =i= | (un)pin your toot at point |
-| =d= | delete your toot at point, and reload current timeline |
-| =D= | delete and redraft toot at point, preserving reply/CW/visibility |
+|----------------+-----------------------------------------------------------------------|
+| Key | Action |
+|----------------+-----------------------------------------------------------------------|
+| | *Help* |
+| =?= | Open context menu if =discover= is available |
+|----------------+-----------------------------------------------------------------------|
+| | *Timeline actions* |
+| =n= | Go to next item (toot, notification) |
+| =p= | Go to previous item (toot, notification) |
+| =M-n=/=<tab>= | Go to the next interesting thing that has an action |
+| =M-p=/=<S-tab>= | Go to the previous interesting thing that has an action |
+| =F= | Open federated timeline |
+| =H= | Open home timeline |
+| =L= | Open local timeline |
+| =N= | Open notifications timeline |
+| =@= | Open mentions-only notifications timeline |
+| =u= | Update current timeline |
+| =T= | Open thread for toot under =point= |
+| =#= | Prompt for tag and open its timeline |
+| =A= | Open author profile of toot under =point= |
+| =P= | Open profile of user attached to toot under =point= |
+| =O= | View own profile |
+| =U= | update your profile bio note |
+|----------------+-----------------------------------------------------------------------|
+| | *Other views* |
+| =S= | search (posts, users, tags) (NB: only posts you have interacted with) |
+| =I=, =c=, =d= | view, create, and delete filters |
+| =R=, =a=, =j= | view/accept/reject follow requests |
+| =G= | view follow suggestions |
+| =V= | view your favourited toots |
+| =K= | view bookmarked toots |
+| =X= | view/edit/create/delete lists |
+|----------------+-----------------------------------------------------------------------|
+| | *Toot actions* |
+| =t= | Compose a new toot |
+| =c= | Toggle content warning content |
+| =b= | Boost toot under =point= |
+| =f= | Favourite toot under =point= |
+| =k= | toggle bookmark of toot at point |
+| =r= | Reply to toot under =point= |
+| =v= | Vote on poll at point |
+| =C= | copy url of toot at point |
+| =C-RET= | play video/gif at point (requires =mpv=) |
+| =e= | edit your toot at point |
+| =E= | view edits of toot at point |
+| =i= | (un)pin your toot at point |
+| =d= | delete your toot at point, and reload current timeline |
+| =D= | delete and redraft toot at point, preserving reply/CW/visibility |
| (=S-C-=) =W=, =M=, =B= | (un)follow, (un)mute, (un)block author of toot at point |
-|---------------+-----------------------------------------------------------------------|
-| | Notifications view |
-| =a=, =j= | accept/reject follow request |
-| =c= | clear notification at point |
-| | see =mastodon-notifications--get-*= functions for filtered views |
-|---------------+-----------------------------------------------------------------------|
-| | *Quitting* |
-| =q= | Quit mastodon buffer, leave window open |
-| =Q= | Quit mastodon buffer and kill window |
-|---------------+-----------------------------------------------------------------------|
+|----------------+-----------------------------------------------------------------------|
+| | *Profile view* |
+| =C-c C-c= | cycle between statuses, followers, following, and statuses without boosts |
+| | =mastodon-profile--account-account-to-list= (see lists view) |
+|----------------+-----------------------------------------------------------------------|
+| | *Notifications view* |
+| =a=, =j= | accept/reject follow request |
+| =c= | clear notification at point |
+| | see =mastodon-notifications--get-*= functions for filtered views |
+|----------------+-----------------------------------------------------------------------|
+| | *Quitting* |
+| =q= | Quit mastodon buffer, leave window open |
+| =Q= | Quit mastodon buffer and kill window |
+|----------------+-----------------------------------------------------------------------|
**** Toot byline legend
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 3a869ed..c604bcd 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -69,6 +69,8 @@
(autoload 'mastodon-search--insert-users-propertized "mastodon-search")
(autoload 'mastodon-tl--get-endpoint "mastodon-tl.el")
(autoload 'mastodon-toot--get-max-toot-chars "mastodon-toot")
+(autoload 'mastodon-tl--add-account-to-list "mastodon-tl")
+
(defvar mastodon-instance-url)
(defvar mastodon-tl--buffer-spec)
(defvar mastodon-tl--update-point)
@@ -243,6 +245,15 @@ JSON is the data returned by the server."
(mastodon-search--insert-users-propertized json :note)))
;; (mastodon-profile--add-author-bylines json)))
+(defun mastodon-profile--add-account-to-list ()
+ "Add account of current profile buffer to a list."
+ (interactive)
+ (when mastodon-profile--account
+ (let* ((profile mastodon-profile--account)
+ (id (alist-get 'id profile))
+ (handle (alist-get 'acct profile)))
+ (mastodon-tl--add-account-to-list nil id handle))))
+
;;; ACCOUNT PREFERENCES
(defun mastodon-profile--get-json-value (val)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 0928b1b..e3a2665 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -77,6 +77,7 @@
(autoload 'mastodon-http--build-array-args-alist "mastodon-http")
(autoload 'mastodon-http--build-query-string "mastodon-http")
(autoload 'mastodon-notifications--filter-types-list "mastodon-notifications")
+(autoload 'mastodon-toot--get-toot-edits "mastodon-toot")
(when (require 'mpv nil :no-error)
(declare-function mpv-start "mpv"))
@@ -665,10 +666,10 @@ this just means displaying toot client."
'face 'mastodon-display-name-face
'follow-link t
'mouse-face 'highlight
- 'mastodon-tab-stop 'shr-url
- 'shr-url app-url
+ 'mastodon-tab-stop 'shr-url
+ 'shr-url app-url
'help-echo app-url
- 'keymap mastodon-tl--shr-map-replacement)))))
+ 'keymap mastodon-tl--shr-map-replacement)))))
(when edited-time
(concat
(if (fontp (char-displayable-p #10r128274))
@@ -1716,15 +1717,6 @@ If ID is provided, use that list."
(let* ((url (mastodon-http--api (format "lists/%s/accounts" list-id))))
(mastodon-http--get-json url)))
-(defun mastodon-tl--add-profile-account-to-list ()
- "Add account of current profile buffer to a list."
- (interactive)
- (when mastodon-profile--account
- (let* ((profile mastodon-profile--account)
- (id (alist-get 'id profile))
- (handle (alist-get 'acct profile)))
- (mastodon-tl--add-account-to-list nil id handle))))
-
;;; FILTERS
(defun mastodon-tl--create-filter ()