aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org35
-rw-r--r--lisp/mastodon-discover.el2
-rw-r--r--lisp/mastodon-notifications.el28
-rw-r--r--lisp/mastodon-profile.el10
-rw-r--r--lisp/mastodon-tl.el4
-rw-r--r--lisp/mastodon-toot.el1
6 files changed, 61 insertions, 19 deletions
diff --git a/README.org b/README.org
index f8e3af4..3b91224 100644
--- a/README.org
+++ b/README.org
@@ -108,27 +108,27 @@ take place if your =mastodon-token-file= does not contain =:client_id= and
|---------------+-----------------------------------------------------------------------|
| Key | Action |
|---------------+-----------------------------------------------------------------------|
-| | /Help/ |
+| | *Help* |
| =?= | Open context menu if =discover= is available |
|---------------+-----------------------------------------------------------------------|
-| | /Timeline actions/ |
+| | *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 |
-| =u= | Update timeline |
-| =#= | Prompt for tag and open its timeline |
-| =A= | Open author profile of toot under =point= |
| =F= | Open federated timeline |
| =H= | Open home timeline |
| =L= | Open local timeline |
| =N= | Open 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 |
-| =T= | Open thread buffer for toot under =point= |
|---------------+-----------------------------------------------------------------------|
-| | Other views |
+| | *Other views* |
| =S= | search (posts, users, tags) (NB: only posts you have interacted with) |
| =I=, =c=, =d= | view, create, and delete filters |
| =R=, =a=, =r= | view/accept/reject follow requests |
@@ -136,31 +136,30 @@ take place if your =mastodon-token-file= does not contain =:client_id= and
| =V= | view your favorited toots |
| =K= | view bookmarked toots |
|---------------+-----------------------------------------------------------------------|
-| | /Toot actions/ |
+| | *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= |
-| =t= | Compose a new toot |
| =v= | Vote on poll at point |
| =C= | copy url of toot at point |
| =C-RET= | play video/gif at point (requires =mpv=) |
-| =i= | (un)pin 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 |
-| =W=, =M=, =B= | (un)follow, (un)mute, (un)block author of toot at point |
-| =k= | toggle bookmark of toot at point |
+| (=S-C=) =W=, =M=, =B= | (un)follow, (un)mute, (un)block author of toot at point |
|---------------+-----------------------------------------------------------------------|
| | Notifications view |
| =a=, =j= | accept/reject follow request |
|---------------+-----------------------------------------------------------------------|
-| | /Switching to other buffers/ |
-| | /Quitting/ |
+| | *Quitting* |
| =q= | Quit mastodon buffer, leave window open |
| =Q= | Quit mastodon buffer and kill window |
|---------------+-----------------------------------------------------------------------|
-**** Legend
+**** Toot byline legend
|----------------+------------------------|
| Marker | Meaning |
@@ -212,13 +211,17 @@ See =M-x customize-group RET mastodon= to view all customize options.
- Use proportional fonts
- Timestamp format
- Relative timestamps
- - Display use avatars
+ - Display user avatars
- Avatar image hight
- Enable image caching
- Compose options:
- Default toot visibility, using =mastodon-toot--default-visibility= variable. Valid values are ="public"=, ="unlisted"=, ="private"=, or =direct=.
+<<<<<<< HEAD
+ - Completions for user mentions
+=======
- Completion for mentions and tags
+>>>>>>> develop
- Enable custom emoji
*** live-updating timelines: =mastodon-async-mode=
diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el
index 20ed092..f33b25d 100644
--- a/lisp/mastodon-discover.el
+++ b/lisp/mastodon-discover.el
@@ -90,7 +90,7 @@
("u" "copy URL" 'shr-maybe-probe-and-copy-url))
("Profile view"
("g" "Show following" mastodon-profile--open-following)
- ("s" "Show followers" mastodon-profile--open-followers)
+ ("s" "Show followers" mastodon-profile--open-followers)
("C-c C-c" "Cycle profile views" mastodon-profile-account-view-cycle)
("R" "View follow requests" mastodon-profile--view-follow-requests)
("a" "Accept follow request" mastodon-profile--follow-request-accept)
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 0d11fb4..9986ede 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -268,5 +268,33 @@ of the toot responded to."
"notifications"
'mastodon-notifications--timeline))
+(defun mastodon-notifications-clear ()
+ "Clear all notifications."
+ (interactive)
+ (let ((response
+ (mastodon-http--post (mastodon-http--api "notifications/clear")
+ nil nil)))
+ (mastodon-http--triage
+ response (lambda ()
+ (when mastodon-tl--buffer-spec
+ (mastodon-tl--reload-timeline-or-profile))
+ (message "All notifications cleared!")))))
+
+(defun mastodon-notifications-clear-current-notif ()
+ "Dismiss the notification at point."
+ (interactive)
+ (let* ((id (or (mastodon-tl--property 'toot-id)
+ (mastodon-tl--field 'id
+ (mastodon-tl--property 'toot-json))))
+ (response
+ (mastodon-http--post (mastodon-http--api
+ (format "notifications/%s/dismiss" id))
+ nil nil)))
+ (mastodon-http--triage
+ response (lambda ()
+ (when mastodon-tl--buffer-spec
+ (mastodon-tl--reload-timeline-or-profile))
+ (message "Notification dismissed!")))))
+
(provide 'mastodon-notifications)
;;; mastodon-notifications.el ends here
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 4b541fd..516059e 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -436,6 +436,14 @@ If toot is a boost, opens the profile of the booster."
(message "Loading your profile...")
(mastodon-profile--show-user (mastodon-auth--get-account-name)))
+(defun mastodon-profile--view-author-profile ()
+ "View the profile of author of present toot."
+ (interactive)
+ (let* ((toot-json (mastodon-tl--property 'toot-json))
+ (acct (alist-get 'account toot-json))
+ (handle (alist-get 'acct acct)))
+ (mastodon-profile--show-user handle)))
+
(defun mastodon-profile--account-field (account field)
"Return FIELD from the ACCOUNT.
@@ -494,7 +502,7 @@ These include the author, author of reblogged entries and any user mentioned."
(when status
(let ((this-account
(or (alist-get 'account status) ; status is a toot
- status)) ; status is a user listing
+ status)) ; status is a user listing
(mentions (or (alist-get 'mentions (alist-get 'status status))
(alist-get 'mentions status)))
(reblog (or (alist-get 'reblog (alist-get 'status status))
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 45e7282..079af22 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -65,6 +65,7 @@
(autoload 'mastodon-search--insert-users-propertized "mastodon-search")
(autoload 'mastodon-search--get-user-info "mastodon-search")
(autoload 'mastodon-http--delete "mastodon-http")
+(autoload 'mastodon-profile--view-author-profile "mastodon-profile")
(when (require 'mpv nil :no-error)
(declare-function mpv-start "mpv"))
@@ -196,9 +197,10 @@ types of mastodon links and not just shr.el-generated ones.")
(when (require 'mpv nil :no-error)
(let ((map (make-sparse-keymap)))
(define-key map (kbd "<C-return>") 'mastodon-tl--mpv-play-video-from-byline)
+ (define-key map (kbd "<return>") 'mastodon-profile--view-author-profile)
(keymap-canonicalize map)))
"The keymap to be set for the author byline.
-The idea is that you can play media without navigating to it.")
+It is active where point is placed by `mastodon-tl--goto-next-toot.'")
(defun mastodon-tl--next-tab-item ()
"Move to the next interesting item.
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index be3aaad..23abb84 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -60,6 +60,7 @@
(autoload 'mastodon-http--read-file-as-string "mastodon-http")
(autoload 'mastodon-http--triage "mastodon-http")
(autoload 'mastodon-search--search-accounts-query "mastodon-search")
+(autoload 'mastodon-search--search-tags-query "mastodon-search")
(autoload 'mastodon-tl--as-string "mastodon-tl")
(autoload 'mastodon-tl--clean-tabs-and-nl "mastodon-tl")
(autoload 'mastodon-tl--field "mastodon-tl")