From 8765cdc693eaa7fdc28d0ce4b95efa051c10ebdb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 24 Mar 2023 11:26:08 +0100 Subject: factor out views--get-instance-url --- lisp/mastodon-views.el | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index affd899..74a3353 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -718,6 +718,25 @@ BRIEF means show fewer details." (interactive) (mastodon-views--view-instance-description nil :brief)) +(defun mastodon-views--get-instance-url (url username &optional instance) + "Return an instance base url from a user account URL. +USERNAME is the name to cull. +If INSTANCE is given, use that." + (cond (instance + (concat "https://" instance)) + ;; pleroma URL is https://instance.com/users/username + ((string-suffix-p "users/" (url-basepath url)) + (string-remove-suffix "/users/" + (url-basepath url))) + ;; friendica is https://instance.com/profile/user + ((string-suffix-p "profile/" (url-basepath url)) + (string-remove-suffix "/profile/" + (url-basepath url))) + ;; mastodon is https://instance.com/@user + (t + (string-remove-suffix (concat "/@" username) + url)))) + (defun mastodon-views--view-instance-description (&optional user brief instance) "View the details of the instance the current post's author is on. USER means to show the instance details for the logged in user. @@ -754,20 +773,7 @@ INSTANCE is an instance domain name." (username (if (mastodon-tl--property 'profile-json) (alist-get 'username toot) ;; profile (alist-get 'username account))) - (instance (cond (instance - (concat "https://" instance)) - ;; pleroma URL is https://instance.com/users/username - ((string-suffix-p "users/" (url-basepath url)) - (string-remove-suffix "/users/" - (url-basepath url))) - ;; friendica is https://instance.com/profile/user - ((string-suffix-p "profile/" (url-basepath url)) - (string-remove-suffix "/profile/" - (url-basepath url))) - ;; mastodon: - (t - (string-remove-suffix (concat "/@" username) - url)))) + (instance (mastodon-views--get-instance-url url username instance)) (response (mastodon-http--get-json (if user (mastodon-http--api "instance") -- cgit v1.2.3 From 693a6ea36a4701fe254000a7c9b3046519574f50 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 12:15:59 +0200 Subject: update foll reqs bindings string: r is now j, r is always reply. --- lisp/mastodon-views.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 74a3353..75f34d3 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -459,7 +459,7 @@ If ID is provided, use that list." JSON is the data returned by the server." (mastodon-views--minor-view "follow requests" - "a/r - accept/reject request at point\n n/p - go to next/prev request" + "a/j - accept/reject request at point\n n/p - go to next/prev request" #'mastodon-views--insert-users-propertized-note json)) -- cgit v1.2.3 From 3a3371d7f98f3097fb2b294b3a409d2a0d0f1bb8 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 12:17:03 +0200 Subject: tl--update: make message the else clause of if json (parens) --- lisp/mastodon-tl.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index fbee377..690a98e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2346,8 +2346,8 @@ This location is defined by a non-nil value of (goto-char (or mastodon-tl--update-point (point-min))) (funcall update-function json) (when mastodon-tl--after-update-marker - (goto-char mastodon-tl--after-update-marker)))) - (message "nothing to update"))))) + (goto-char mastodon-tl--after-update-marker))) + (message "nothing to update")))))) ;;; LOADING TIMELINES -- cgit v1.2.3 From 5a3a6dcbadb60e4794733f8e26dc3c8d1f5c187c Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 12:17:35 +0200 Subject: add force arg to notifs-get, and use it in reload-timeline- --- lisp/mastodon-tl.el | 2 +- lisp/mastodon.el | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 690a98e..d041b2f 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2086,7 +2086,7 @@ For use after e.g. deleting a toot." ((mastodon-tl--buffer-type-eq 'local) (mastodon-tl--get-local-timeline)) ((mastodon-tl--buffer-type-eq 'notifications) - (mastodon-notifications-get)) + (mastodon-notifications-get nil nil :force)) ((mastodon-tl--buffer-type-eq 'own-profile) (mastodon-profile--my-profile)) ((save-match-data diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 5f7034e..a78685e 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -275,15 +275,18 @@ If REPLY-JSON is the json of the toot being replied to." (mastodon-toot--compose-buffer user reply-to-id reply-json)) ;;;###autoload -(defun mastodon-notifications-get (&optional type buffer-name) +(defun mastodon-notifications-get (&optional type buffer-name force) "Display NOTIFICATIONS in buffer. Optionally only print notifications of type TYPE, a string. -BUFFER-NAME is added to \"*mastodon-\" to create the buffer name." +BUFFER-NAME is added to \"*mastodon-\" to create the buffer name. +FORCE means do not try to update an existing buffer, but fetch +from the server and load anew." (interactive) (let ((buffer (if buffer-name (concat "*mastodon-" buffer-name "*") "*mastodon-notifications*"))) - (if (get-buffer buffer) + (if (and (not force) + (get-buffer buffer)) (progn (switch-to-buffer buffer) (mastodon-tl--update)) (message "Loading your notifications...") -- cgit v1.2.3 From cd44f7807ffea4ecb86f07bfd160f9416908eb5d Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 12:22:11 +0200 Subject: remove all ;; Package-Requires: declarations save for main file main file is set in .dir-locals.el now --- lisp/mastodon-auth.el | 1 - lisp/mastodon-client.el | 1 - lisp/mastodon-discover.el | 1 - lisp/mastodon-http.el | 1 - lisp/mastodon-media.el | 1 - lisp/mastodon-notifications.el | 1 - lisp/mastodon-search.el | 1 - lisp/mastodon-tl.el | 1 - lisp/mastodon-toot.el | 1 - lisp/mastodon-views.el | 1 - 10 files changed, 10 deletions(-) diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el index ec56a05..0db8a19 100644 --- a/lisp/mastodon-auth.el +++ b/lisp/mastodon-auth.el @@ -5,7 +5,6 @@ ;; Author: Johnson Denen ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-client.el b/lisp/mastodon-client.el index 5981a26..b358ed7 100644 --- a/lisp/mastodon-client.el +++ b/lisp/mastodon-client.el @@ -5,7 +5,6 @@ ;; Author: Johnson Denen ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el index 958df92..c06de1f 100644 --- a/lisp/mastodon-discover.el +++ b/lisp/mastodon-discover.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 3632a11..49ffbf8 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1") (request "0.3.0")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 63860bd..4d36f47 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 22228f2..fd48a65 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 3555238..e8ab093 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -4,7 +4,6 @@ ;; Author: Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d041b2f..3885220 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1") (ts "0.3")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 65fc357..dfc02ee 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -6,7 +6,6 @@ ;; Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1") (persist "0.4")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 75f34d3..558bf81 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -4,7 +4,6 @@ ;; Author: Marty Hiatt ;; Maintainer: Marty Hiatt ;; Version: 1.0.0 -;; Package-Requires: ((emacs "27.1")) ;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. -- cgit v1.2.3 From 34db55b8ae375bb397c1cb3614abaaa847d2de3f Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 12:31:59 +0200 Subject: notifs-foll-req process: call reload-timeline-or-profile --- lisp/mastodon-notifications.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index fd48a65..51d8422 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -126,7 +126,7 @@ follow-requests view." (lambda () (if f-reqs-view-p (mastodon-views--view-follow-requests) - (mastodon-notifications-get)) + (mastodon-tl--reload-timeline-or-profile)) (message "Follow request of %s (@%s) %s!" name handle (if reject "rejected" -- cgit v1.2.3 From d1ffaca6e21b988255d1b980a9de6bb1d976e1af Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 15:14:48 +0200 Subject: work on reloading a view after sending an edited toot. FIX #421. - fix up reload-timeline-or-profile - additions to --send for edited toots position of point is only rough, chosen from buffer point prior to reload, but buffers change on reload (things added if timeline, things removed if delete toot or clear notif. we may need to find a much better way. --- lisp/mastodon-tl.el | 47 +++++++++++++++++++++++++++++------------------ lisp/mastodon-toot.el | 34 +++++++++++++++++++--------------- 2 files changed, 48 insertions(+), 33 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 3885220..c0c7e5e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2075,25 +2075,36 @@ the current view." (mastodon-http--get-json url args))) ;; TODO: add this to new posts in some cases, e.g. in thread view. -(defun mastodon-tl--reload-timeline-or-profile () +(defun mastodon-tl--reload-timeline-or-profile (&optional pos) "Reload the current timeline or profile page. -For use after e.g. deleting a toot." - (cond ((mastodon-tl--buffer-type-eq 'home) - (mastodon-tl--get-home-timeline)) - ((mastodon-tl--buffer-type-eq 'federated) - (mastodon-tl--get-federated-timeline)) - ((mastodon-tl--buffer-type-eq 'local) - (mastodon-tl--get-local-timeline)) - ((mastodon-tl--buffer-type-eq 'notifications) - (mastodon-notifications-get nil nil :force)) - ((mastodon-tl--buffer-type-eq 'own-profile) - (mastodon-profile--my-profile)) - ((save-match-data - (string-match - "statuses/\\(?2:[[:digit:]]+\\)/context" - (mastodon-tl--get-endpoint)) - (mastodon-tl--thread - (match-string 2 (mastodon-tl--get-endpoint))))))) +For use after e.g. deleting a toot. +POS is a number, where point will be placed." + (let ((type (mastodon-tl--get-buffer-type))) + (cond ((eq type 'home) + (mastodon-tl--get-home-timeline)) + ((eq type 'federated) + (mastodon-tl--get-federated-timeline)) + ((eq type 'local) + (mastodon-tl--get-local-timeline)) + ((eq type 'mentions) + (mastodon-notifications--get-mentions)) + ((eq type 'notifications) + (mastodon-notifications-get nil nil :force)) + ((eq type 'profile-statuses-no-boosts) + (mastodon-profile--open-statuses-no-reblogs)) + ((eq type 'profile-statuses) + (mastodon-profile--my-profile)) + ((eq type 'thread) + (save-match-data + (let ((endpoint (mastodon-tl--get-endpoint))) + (string-match + "statuses/\\(?2:[[:digit:]]+\\)/context" + endpoint) + (mastodon-tl--thread + (match-string 2 endpoint)))))) + ;; TODO: sends point to POS, which was where point was in buffer before reload. This is very rough; we may have removed an item (deleted a toot, cleared a notif), so the buffer will be smaller, point will end up past where we were, etc. + (when pos + (goto-char pos)))) (defun mastodon-tl--build-link-header-url (str) "Return a URL from STR, an http Link header." diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index dfc02ee..81185e8 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -773,11 +773,12 @@ instance to edit a toot." (let* ((toot (mastodon-toot--remove-docs)) (scheduled mastodon-toot--scheduled-for) (scheduled-id mastodon-toot--scheduled-id) + (edit-id mastodon-toot--edit-toot-id) (endpoint - (if mastodon-toot--edit-toot-id + (if edit-id ;; we are sending an edit: (mastodon-http--api (format "statuses/%s" - mastodon-toot--edit-toot-id)) + edit-id)) (mastodon-http--api "statuses"))) (spoiler (when (and (not (mastodon-toot--empty-p)) mastodon-toot--content-warning) @@ -819,22 +820,25 @@ instance to edit a toot." ((mastodon-toot--empty-p) (message "Empty toot. Cowardly refusing to post this.")) (t - (let ((response (if mastodon-toot--edit-toot-id + (let ((response (if edit-id ;; we are sending an edit: (mastodon-http--put endpoint args) (mastodon-http--post endpoint args)))) - (mastodon-http--triage response - (lambda () - (mastodon-toot--kill) - (if scheduled - (message "Toot scheduled!") - (message "Toot toot!")) - ;; cancel scheduled toot if we were editing it: - (when scheduled-id - (mastodon-views--cancel-scheduled-toot - scheduled-id :no-confirm)) - (mastodon-toot--restore-previous-window-config - prev-window-config)))))))) + (mastodon-http--triage + response + (lambda () + (mastodon-toot--kill) + (if scheduled + (message "Toot scheduled!") + (message "Toot toot!")) + ;; cancel scheduled toot if we were editing it: + (when scheduled-id + (mastodon-views--cancel-scheduled-toot + scheduled-id :no-confirm)) + (mastodon-toot--restore-previous-window-config prev-window-config) + (when edit-id + (let ((pos (marker-position (cadr prev-window-config)))) + (mastodon-tl--reload-timeline-or-profile pos)))))))))) ;; EDITING TOOTS: -- cgit v1.2.3 From 2c3b1259852be0d3ca16e8c3c294c540f53b4bd6 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 15:17:39 +0200 Subject: tl autoloads --- lisp/mastodon-tl.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index c0c7e5e..e07d3dd 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -39,6 +39,9 @@ (require 'mastodon-iso) (require 'mpv nil :no-error) +(autoload 'mastodon-mode "mastodon") +(autoload 'mastodon-notifications-get "mastodon") +(autoload 'mastodon-url-lookup "mastodon") (autoload 'mastodon-auth--get-account-id "mastodon-auth") (autoload 'mastodon-auth--get-account-name "mastodon-auth") (autoload 'mastodon-http--api "mastodon-http") @@ -55,10 +58,8 @@ (autoload 'mastodon-media--get-avatar-rendering "mastodon-media") (autoload 'mastodon-media--get-media-link-rendering "mastodon-media") (autoload 'mastodon-media--inline-images "mastodon-media") -(autoload 'mastodon-mode "mastodon") (autoload 'mastodon-notifications--filter-types-list "mastodon-notifications") -(autoload 'mastodon-notifications-get "mastodon-notifications" - "Display NOTIFICATIONS in buffer." t) ; interactive +(autoload 'mastodon-notifications--get-mentions "mastodon-notifications") (autoload 'mastodon-profile--account-field "mastodon-profile") (autoload 'mastodon-profile--account-from-id "mastodon-profile") (autoload 'mastodon-profile--extract-users-handles "mastodon-profile") @@ -67,6 +68,7 @@ (autoload 'mastodon-profile--lookup-account-in-status "mastodon-profile") (autoload 'mastodon-profile--make-author-buffer "mastodon-profile") (autoload 'mastodon-profile--my-profile "mastodon-profile") +(autoload 'mastodon-profile--open-statuses-no-reblogs "mastodon-profile") (autoload 'mastodon-profile--profile-json "mastodon-profile") (autoload 'mastodon-profile--search-account-by-handle "mastodon-profile") (autoload 'mastodon-profile--toot-json "mastodon-profile") @@ -82,7 +84,6 @@ (autoload 'mastodon-toot--schedule-toot "mastodon-toot") (autoload 'mastodon-toot--set-toot-properties "mastodon-toot") (autoload 'mastodon-toot--update-status-fields "mastodon-toot") -(autoload 'mastodon-url-lookup "mastodon") (defvar mastodon-toot--visibility) (defvar mastodon-toot-mode) -- cgit v1.2.3 From 1980903f2dc179a15aecaceabd3c23a1d550d238 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 20:56:07 +0200 Subject: send POS arg to reload-tl on delete toot --- lisp/mastodon-toot.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 81185e8..9aee54e 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -568,7 +568,8 @@ NO-REDRAFT means delete toot only." (url (mastodon-http--api (format "statuses/%s" id))) (toot-cw (alist-get 'spoiler_text toot)) (toot-visibility (alist-get 'visibility toot)) - (reply-id (alist-get 'in_reply_to_id toot))) + (reply-id (alist-get 'in_reply_to_id toot)) + (pos (point))) (if (not (mastodon-toot--own-toot-p toot)) (message "You can only delete (and redraft) your own toots.") (when (y-or-n-p (if no-redraft @@ -581,7 +582,7 @@ NO-REDRAFT means delete toot only." (if no-redraft (progn (when mastodon-tl--buffer-spec - (mastodon-tl--reload-timeline-or-profile)) + (mastodon-tl--reload-timeline-or-profile pos)) (message "Toot deleted!")) (mastodon-toot--redraft response reply-id -- cgit v1.2.3 From 557c7f938ba3326e9051c837ad9aa33cc1d13169 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Mar 2023 20:56:19 +0200 Subject: try moving to prev item after moving to POS on reload after action --- lisp/mastodon-tl.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index e07d3dd..fe86c7e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2105,7 +2105,8 @@ POS is a number, where point will be placed." (match-string 2 endpoint)))))) ;; TODO: sends point to POS, which was where point was in buffer before reload. This is very rough; we may have removed an item (deleted a toot, cleared a notif), so the buffer will be smaller, point will end up past where we were, etc. (when pos - (goto-char pos)))) + (goto-char pos) + (mastodon-tl--goto-prev-item)))) (defun mastodon-tl--build-link-header-url (str) "Return a URL from STR, an http Link header." -- cgit v1.2.3 From 14dbf79135f6751fc93eb5e85e0b2eae3bde6568 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 28 Mar 2023 14:52:28 +0200 Subject: notifs: fix edit response alist --- lisp/mastodon-notifications.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 51d8422..bed2d9a 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -76,7 +76,7 @@ ("Posted a poll" . "that has now ended") ("Requested to follow" . "you") ("Posted" . "a post") - ("Edited" . "a post")) + ("Edited" . "a post from")) "Alist of subjects for notification types.") (defvar mastodon-notifications--map -- cgit v1.2.3 From d599eda11f539236238e018d29757b4253cef334 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 13:37:48 +0200 Subject: user-handles-get: return immediately if only one candidate FIX #420. --- lisp/mastodon-tl.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index fe86c7e..36539d3 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1921,13 +1921,16 @@ LANGS is the accumulated array param alist if we re-run recursively." (t (mastodon-profile--extract-users-handles (mastodon-profile--toot-json)))))) - (completing-read (if (or (equal action "disable") - (equal action "enable")) - (format "%s notifications when user posts: " action) - (format "Handle of user to %s: " action)) - user-handles - nil ; predicate - 'confirm)))) + ;; return immediately if only 1 handle: + (if (eq 1 (length user-handles)) + (car user-handles) + (completing-read (if (or (equal action "disable") + (equal action "enable")) + (format "%s notifications when user posts: " action) + (format "Handle of user to %s: " action)) + user-handles + nil ; predicate + 'confirm))))) (defun mastodon-tl--interactive-blocks-or-mutes-list-get (action) "Fetch the list of accounts for ACTION from the server. -- cgit v1.2.3 From 911169f518deed674e2553b95b47ec03f8d6e72a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 16:50:22 +0200 Subject: remove duplicate autoload --- lisp/mastodon.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index a78685e..9ab6098 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -63,7 +63,6 @@ (autoload 'mastodon-profile--view-favourites "mastodon-profile") (autoload 'mastodon-search--search-query "mastodon-search") (autoload 'mastodon-search--trending-tags "mastodon-search") -(autoload 'mastodon-search--trending-tags "mastodon-search") (autoload 'mastodon-tl--block-user "mastodon-tl") (autoload 'mastodon-tl--follow-user "mastodon-tl") (autoload 'mastodon-tl--get-buffer-type "mastodon-tl") -- cgit v1.2.3 From 96a2448ad45a8f4c7346c91cc73b215213411ca0 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 16:51:21 +0200 Subject: refactor trending-tags to view-trending, add trending-statuses --- lisp/mastodon-search.el | 52 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index e8ab093..bc51d22 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -40,10 +40,13 @@ (autoload 'mastodon-tl--render-text "mastodon-tl") (autoload 'mastodon-tl--set-buffer-spec "mastodon-tl") (autoload 'mastodon-tl--set-face "mastodon-tl") +(autoload 'mastodon-tl--timeline "mastodon-tl") +(autoload 'mastodon-tl--toot "mastodon-tl") (defvar mastodon-toot--completion-style-for-mentions) (defvar mastodon-instance-url) (defvar mastodon-tl--link-keymap) +(defvar mastodon-tl--horiz-bar) ;; functions for completion of mentions in mastodon-toot @@ -81,26 +84,53 @@ QUERY is the string to search." (defun mastodon-search--trending-tags () "Display a list of tags trending on your instance." (interactive) - (let* ((url (mastodon-http--api "trends")) + (mastodon-search--view-trending "tags" + #'mastodon-search--print-tags-list)) + +(defun mastodon-search--trending-statuses () + "Display a list of statuses trending on your instance." + (interactive) + (mastodon-search--view-trending "statuses" + #'mastodon-tl--timeline)) + +(defun mastodon-search--get-full-statuses-data (response) + "For statuses list in RESPONSE, fetch and return full status JSON." + (let ((status-ids-list + (mapcar #'mastodon-search--get-id-from-status response))) + (mapcar #'mastodon-search--fetch-full-status-from-id + status-ids-list))) + +(defun mastodon-search--view-trending (type print-fun) + "Display a list of tags trending on your instance. +TYPE is a string, either tags, statuses, or links. +PRINT-FUN is the function used to print the data from the response." + (let* ((url (mastodon-http--api + (format "trends/%s" type))) (response (mastodon-http--get-json url)) - (tags (mapcar #'mastodon-search--get-hashtag-info - response)) - (buffer (get-buffer-create "*mastodon-trending*"))) + (data (cond ((equal type "tags") + (mapcar #'mastodon-search--get-hashtag-info + response)) + ((equal type "statuses") + (mastodon-search--get-full-statuses-data response)) + ((equal type "links") + (message "todo")))) + (buffer (get-buffer-create + (format "*mastodon-trending-%s*" type)))) (with-current-buffer buffer (switch-to-buffer (current-buffer)) (mastodon-mode) (let ((inhibit-read-only t)) (erase-buffer) (mastodon-tl--set-buffer-spec (buffer-name buffer) - "api/v1/trends" + (format "api/v1/trends/%s" type) nil) ;; hashtag results: (insert (mastodon-tl--set-face (concat "\n " mastodon-tl--horiz-bar "\n" - " TRENDING HASHTAGS\n" + (upcase (format " TRENDING %s\n" type)) " " mastodon-tl--horiz-bar "\n\n") 'success)) - (mastodon-search--print-tags-list tags))))) + (funcall print-fun data))))) ;; functions for mastodon search @@ -118,12 +148,8 @@ QUERY is the string to search." ;; accts)) ; returns a list of three-item lists (tags-list (mapcar #'mastodon-search--get-hashtag-info tags)) - ;; (status-list (mapcar #'mastodon-search--get-status-info - ;; statuses)) - (status-ids-list (mapcar #'mastodon-search--get-id-from-status - statuses)) - (toots-list-json (mapcar #'mastodon-search--fetch-full-status-from-id - status-ids-list))) + (toots-list-json + (mastodon-search--get-full-statuses-data statuses))) (with-current-buffer (get-buffer-create buffer) (switch-to-buffer buffer) (mastodon-mode) -- cgit v1.2.3 From f76bcc5a20383bb55855eb0d76158c7f187902b1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 16:59:40 +0200 Subject: remove stray interactive calls for search-accounts/tags-query --- lisp/mastodon-search.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index bc51d22..4b4684f 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -59,7 +59,6 @@ (defun mastodon-search--search-accounts-query (query) "Prompt for a search QUERY and return accounts synchronously. Returns a nested list containing user handle, display name, and URL." - (interactive "sSearch mastodon for: ") (let* ((url (mastodon-http--api "accounts/search")) (response (if (equal mastodon-toot--completion-style-for-mentions "following") (mastodon-http--get-json url `(("q" . ,query) ("following" . "true")) :silent) @@ -71,7 +70,6 @@ Returns a nested list containing user handle, display name, and URL." (defun mastodon-search--search-tags-query (query) "Return an alist containing tag strings plus their URLs. QUERY is the string to search." - (interactive "sSearch for hashtag: ") (let* ((url (format "%s/api/v2/search" mastodon-instance-url)) (params `(("q" . ,query) ("type" . "hashtags"))) -- cgit v1.2.3 From db0b60a943e04448bdb0e1c63a061c3d4a4a0e34 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 16:59:56 +0200 Subject: require search --- lisp/mastodon.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 9ab6098..ef0d2c0 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -38,6 +38,7 @@ (eval-when-compile (require 'subr-x)) (require 'mastodon-http) (require 'mastodon-toot) +(require 'mastodon-search) (require 'url) (require 'thingatpt) (require 'shr) @@ -61,8 +62,6 @@ (autoload 'mastodon-profile--update-user-profile-note "mastodon-profile") (autoload 'mastodon-profile--view-bookmarks "mastodon-profile") (autoload 'mastodon-profile--view-favourites "mastodon-profile") -(autoload 'mastodon-search--search-query "mastodon-search") -(autoload 'mastodon-search--trending-tags "mastodon-search") (autoload 'mastodon-tl--block-user "mastodon-tl") (autoload 'mastodon-tl--follow-user "mastodon-tl") (autoload 'mastodon-tl--get-buffer-type "mastodon-tl") -- cgit v1.2.3 From 33b010279e142378ace994cc74c3ce747337f29e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 17:03:03 +0200 Subject: cull stray hashtags comment --- lisp/mastodon-search.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 4b4684f..3794c4e 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -122,7 +122,6 @@ PRINT-FUN is the function used to print the data from the response." (mastodon-tl--set-buffer-spec (buffer-name buffer) (format "api/v1/trends/%s" type) nil) - ;; hashtag results: (insert (mastodon-tl--set-face (concat "\n " mastodon-tl--horiz-bar "\n" (upcase (format " TRENDING %s\n" type)) -- cgit v1.2.3 From 447d49610b8986a3aef763e2ff8566e93110eba7 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 Mar 2023 17:03:10 +0200 Subject: readme: trending statuses --- README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/README.org b/README.org index 405eb20..bea37d9 100644 --- a/README.org +++ b/README.org @@ -260,6 +260,7 @@ work without first loading =mastodon.el=: - =mastodon-tl--view-own-instance=: View information about your own instance. - =mastodon-search--trending-tags=: View a list of trending hashtags on your instance. +- =mastodon-search--trending-statuses=: View a list of trending statuses on your instance. - =mastodon-tl--add-toot-account-at-point-to-list=: Add the account of the toot at point to a list. -- cgit v1.2.3 From 34c9cf55458055c281c9137c591bbfe02dbb64fa Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 30 Mar 2023 09:34:29 +0200 Subject: view-trending: add limit params, and go to point min --- lisp/mastodon-search.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 3794c4e..abb7995 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -104,7 +104,11 @@ TYPE is a string, either tags, statuses, or links. PRINT-FUN is the function used to print the data from the response." (let* ((url (mastodon-http--api (format "trends/%s" type))) - (response (mastodon-http--get-json url)) + ;; max for statuses = 40, for others = 20 + (params (if (equal type "statuses") + `(("limit" . "40")) + `(("limit" . "20")) )) + (response (mastodon-http--get-json url params)) (data (cond ((equal type "tags") (mapcar #'mastodon-search--get-hashtag-info response)) @@ -127,7 +131,9 @@ PRINT-FUN is the function used to print the data from the response." (upcase (format " TRENDING %s\n" type)) " " mastodon-tl--horiz-bar "\n\n") 'success)) - (funcall print-fun data))))) + (funcall print-fun data) + (unless (equal type "statuses") + (goto-char (point-min)))))) ;; functions for mastodon search -- cgit v1.2.3 From 4d4f60ee0559dc43a319726b983bf613154405cd Mon Sep 17 00:00:00 2001 From: Bruce Durling Date: Fri, 31 Mar 2023 18:07:55 +0100 Subject: Fix missing close paren --- lisp/mastodon-search.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index abb7995..9b3641b 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -133,7 +133,7 @@ PRINT-FUN is the function used to print the data from the response." 'success)) (funcall print-fun data) (unless (equal type "statuses") - (goto-char (point-min)))))) + (goto-char (point-min))))))) ;; functions for mastodon search -- cgit v1.2.3 From 6362152c6553385ba4916e4091e0b5cccf25425e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 09:53:24 +0200 Subject: add trending types to -get-buffer-type. FIX #427. --- lisp/mastodon-tl.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 36539d3..05189a2 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1490,8 +1490,13 @@ call this function after it is set or use something else." ;; search ((string-suffix-p "search" endpoint-fun) 'search) - ((string-suffix-p "trends" endpoint-fun) + ;; trends + ((equal "api/v1/trends/statuses" endpoint-fun) + 'trending-statuses) + ((equal "api/v1/trends/tags" endpoint-fun) 'trending-tags) + ((equal "api/v1/trends/links" endpoint-fun) + 'trending-links) ;; User's views: ((string= "filters" endpoint-fun) 'filters) -- cgit v1.2.3 From 4ef17374f084c5039d759682a192e87319d45114 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 12:36:54 +0200 Subject: only_media tl arg: dbl prefix. --- lisp/mastodon-tl.el | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 05189a2..96f8f10 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -348,33 +348,41 @@ Used on initializing a timeline or thread." ;;; TIMELINES -(defun mastodon-tl--get-federated-timeline () - "Opens federated timeline." +(defun mastodon-tl--get-federated-timeline (&optional local) + "Open federated timeline. +If LOCAL, get only local timeline. +With a single prefix arg (C-u), hide-replies. +With a double prefix arg (C-u C-u), only show posts with media." (interactive) (message "Loading federated timeline...") (mastodon-tl--init - "federated" "timelines/public" 'mastodon-tl--timeline nil - `(("limit" . ,mastodon-tl--timeline-posts-count)) - (when current-prefix-arg t))) + (if local "local" "federated") + "timelines/public" 'mastodon-tl--timeline nil + `(("limit" . ,mastodon-tl--timeline-posts-count) + ,(when (eq (car current-prefix-arg) 16) + '("only_media" . "true")) + ,(when local + '("local" . "true"))) + (when (eq (car current-prefix-arg) 4) t))) (defun mastodon-tl--get-home-timeline () - "Opens home timeline." + "Open home timeline. +With a single prefix arg (C-u), hide-replies." (interactive) - (message "Loading home timeline...") - (mastodon-tl--init - "home" "timelines/home" 'mastodon-tl--timeline nil - `(("limit" . ,mastodon-tl--timeline-posts-count)) - (when current-prefix-arg t))) + (let ((params )) + (message "Loading home timeline...") + (mastodon-tl--init + "home" "timelines/home" 'mastodon-tl--timeline nil + `(("limit" . ,mastodon-tl--timeline-posts-count)) + (when (eq (car current-prefix-arg) 4) t)))) (defun mastodon-tl--get-local-timeline () - "Opens local timeline." + "Open local timeline. +With a single prefix arg (C-u), hide-replies. +With a double prefix arg (C-u C-u), only show posts with media." (interactive) (message "Loading local timeline...") - (mastodon-tl--init - "local" "timelines/public" 'mastodon-tl--timeline - nil `(("local" . "true") - ("limit" . ,mastodon-tl--timeline-posts-count)) - (when current-prefix-arg t))) + (mastodon-tl--get-federated-timeline :local)) (defun mastodon-tl--get-tag-timeline (&optional tag) "Prompt for tag and opens its timeline. -- cgit v1.2.3 From 5d54bf51a681e0a417983e983d163fd2386ad9b3 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 13:04:43 +0200 Subject: clean up of timeline funs and their prefix args. FIX #379. --- lisp/mastodon-tl.el | 60 +++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 96f8f10..2f45336 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -348,41 +348,43 @@ Used on initializing a timeline or thread." ;;; TIMELINES -(defun mastodon-tl--get-federated-timeline (&optional local) +(defun mastodon-tl--get-federated-timeline (&optional prefix local) "Open federated timeline. If LOCAL, get only local timeline. -With a single prefix arg (C-u), hide-replies. -With a double prefix arg (C-u C-u), only show posts with media." - (interactive) - (message "Loading federated timeline...") - (mastodon-tl--init - (if local "local" "federated") - "timelines/public" 'mastodon-tl--timeline nil - `(("limit" . ,mastodon-tl--timeline-posts-count) - ,(when (eq (car current-prefix-arg) 16) - '("only_media" . "true")) - ,(when local - '("local" . "true"))) - (when (eq (car current-prefix-arg) 4) t))) - -(defun mastodon-tl--get-home-timeline () - "Open home timeline. -With a single prefix arg (C-u), hide-replies." - (interactive) - (let ((params )) - (message "Loading home timeline...") +With a single PREFIX arg, hide-replies. +With a double PREFIX arg, only show posts with media." + (interactive "p") + (let ((params + `(("limit" . ,mastodon-tl--timeline-posts-count)))) + ;; avoid adding 'nil' to our params alist: + (when (eq prefix 16) + (push '("only_media" . "true") params)) + (when local + (push '("local" . "true") params)) + (message "Loading federated timeline...") (mastodon-tl--init - "home" "timelines/home" 'mastodon-tl--timeline nil - `(("limit" . ,mastodon-tl--timeline-posts-count)) - (when (eq (car current-prefix-arg) 4) t)))) + (if local "local" "federated") + "timelines/public" 'mastodon-tl--timeline nil + params + (when (eq prefix 4) t)))) -(defun mastodon-tl--get-local-timeline () +(defun mastodon-tl--get-home-timeline (&optional arg) + "Open home timeline. +With a single prefix ARG, hide replies." + (interactive "p") + (message "Loading home timeline...") + (mastodon-tl--init + "home" "timelines/home" 'mastodon-tl--timeline nil + `(("limit" . ,mastodon-tl--timeline-posts-count)) + (when (eq arg 4) t))) + +(defun mastodon-tl--get-local-timeline (&optional prefix) "Open local timeline. -With a single prefix arg (C-u), hide-replies. -With a double prefix arg (C-u C-u), only show posts with media." - (interactive) +With a single PREFIX arg, hide-replies. +With a double PREFIX arg, only show posts with media." + (interactive "p") (message "Loading local timeline...") - (mastodon-tl--get-federated-timeline :local)) + (mastodon-tl--get-federated-timeline prefix :local)) (defun mastodon-tl--get-tag-timeline (&optional tag) "Prompt for tag and opens its timeline. -- cgit v1.2.3 From 37f76f3bcb5d1d33412c9517762db57dc469c22b Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 13:12:55 +0200 Subject: readme re timeline prefix args --- README.org | 140 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/README.org b/README.org index bea37d9..fbff0cd 100644 --- a/README.org +++ b/README.org @@ -111,76 +111,76 @@ not contain =:client_id= and =:client_secret=. **** Keybindings -|----------------+---------------------------------------------------------------------------| -| Key | Action | -|----------------+---------------------------------------------------------------------------| -| | *Help* | -| =?= | Show discover menu of all bindings, if =discover= is available | -|----------------+---------------------------------------------------------------------------| -| | *Timeline actions* | -| =n= | Go to next item (toot, notification, user) | -| =p= | Go to previous item (toot, notification, user) | -| =M-n=/== | Go to the next interesting thing that has an action | -| =M-p=/== | 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 at point | -| =#= | Prompt for tag and open its timeline | -| =A= | Open author profile of toot at point | -| =P= | Open profile of user attached to toot at point | -| =O= | View own profile | -| =U= | update your profile bio note | -| =;= | view instance description for toot at point | -| =:= | view followed tags and load a tag timeline | -| =,= | view favouriters of toot at point | -| =.= | view boosters of toot at point | -| =/= | switch between mastodon buffers | -|----------------+---------------------------------------------------------------------------| -| | *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 | -| =S= | view your scheduled toots | -|----------------+---------------------------------------------------------------------------| -| | *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 | -|----------------+---------------------------------------------------------------------------| -| | *Profile view* | -| =C-c C-c= | cycle between statuses, statuses without boosts, followers, and following | -| | =mastodon-profile--account-account-to-list= (see lists view) | -|----------------+---------------------------------------------------------------------------| -| | *Notifications view* | -| =a=, =j= | accept/reject follow request | -| =C-k= | 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 | -| =C-M-q= | Quit and kill all mastodon buffers | -|----------------+---------------------------------------------------------------------------| +|----------------+---------------------------------------------------------------------------------| +| Key | Action | +|----------------+---------------------------------------------------------------------------------| +| | *Help* | +| =?= | Show discover menu of all bindings, if =discover= is available | +|----------------+---------------------------------------------------------------------------------| +| | *Timeline actions* | +| =n= | Go to next item (toot, notification, user) | +| =p= | Go to previous item (toot, notification, user) | +| =M-n=/== | Go to the next interesting thing that has an action | +| =M-p=/== | Go to the previous interesting thing that has an action | +| =F= | Open federated timeline (1 prefix arg: hide-replies, 2 prefix args: media only) | +| =H= | Open home timeline (1 prefix arg: hide-replies) | +| =L= | Open local timeline (1 prefix arg: hide-replies, 2 prefix args: media only) | +| =N= | Open notifications timeline | +| =@= | Open mentions-only notifications timeline | +| =u= | Update current timeline | +| =T= | Open thread for toot at point | +| =#= | Prompt for tag and open its timeline | +| =A= | Open author profile of toot at point | +| =P= | Open profile of user attached to toot at point | +| =O= | View own profile | +| =U= | update your profile bio note | +| =;= | view instance description for toot at point | +| =:= | view followed tags and load a tag timeline | +| =,= | view favouriters of toot at point | +| =.= | view boosters of toot at point | +| =/= | switch between mastodon buffers | +|----------------+---------------------------------------------------------------------------------| +| | *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 | +| =S= | view your scheduled toots | +|----------------+---------------------------------------------------------------------------------| +| | *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 | +|----------------+---------------------------------------------------------------------------------| +| | *Profile view* | +| =C-c C-c= | cycle between statuses, statuses without boosts, followers, and following | +| | =mastodon-profile--account-account-to-list= (see lists view) | +|----------------+---------------------------------------------------------------------------------| +| | *Notifications view* | +| =a=, =j= | accept/reject follow request | +| =C-k= | 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 | +| =C-M-q= | Quit and kill all mastodon buffers | +|----------------+---------------------------------------------------------------------------------| **** Toot byline legend -- cgit v1.2.3 From a41c716456f5a8b4793646f453c81959cf9db0fe Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 13:14:43 +0200 Subject: add limit param to view list timeline. --- lisp/mastodon-views.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 558bf81..b55091f 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -325,7 +325,10 @@ If ID is provided, use that list." (endpoint (format "timelines/list/%s" id)) (name (mastodon-views--get-list-name id)) (buffer-name (format "list-%s" name))) - (mastodon-tl--init buffer-name endpoint 'mastodon-tl--timeline))) + (mastodon-tl--init buffer-name endpoint + 'mastodon-tl--timeline + nil + `(("limit" . ,mastodon-tl--timeline-posts-count))))) (defun mastodon-views--create-list () "Create a new list. -- cgit v1.2.3 From aa982db0c5bc6e9e02a79ada9089cc78199789b9 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 13:27:53 +0200 Subject: add edit toot to compose-buffer-p --- lisp/mastodon-toot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 9aee54e..a1e6ed3 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1609,7 +1609,8 @@ Added to `after-change-functions'." (defun mastodon-toot--compose-buffer-p () "Return t if compose buffer is current." - (mastodon-tl--buffer-type-eq 'new-toot)) + (or (mastodon-tl--buffer-type-eq 'edit-toot) + (mastodon-tl--buffer-type-eq 'new-toot))) ;; NB: now that we have toot drafts, to ensure offline composing remains ;; possible, avoid any direct requests here: -- cgit v1.2.3 From b028fd1cab992b90164665d5997c25782d621d93 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 16:30:04 +0200 Subject: tag tl prefix args: 1- only media, 2- local results --- lisp/mastodon-tl.el | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 2f45336..0c3630b 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -386,22 +386,35 @@ With a double PREFIX arg, only show posts with media." (message "Loading local timeline...") (mastodon-tl--get-federated-timeline prefix :local)) -(defun mastodon-tl--get-tag-timeline (&optional tag) +(defun mastodon-tl--get-tag-timeline (&optional prefix tag) "Prompt for tag and opens its timeline. -Optionally load TAG timeline directly." - (interactive) +Optionally load TAG timeline directly. +With a single PREFIX arg, only show posts with media. +With a double PREFIX arg, limit results to your own instance." + (interactive "p") (let* ((word (or (word-at-point) "")) (input (or tag (read-string (format "Load timeline for tag (%s): " word)))) (tag (or tag (if (string-empty-p input) word input)))) (message "Loading timeline for #%s..." tag) - (mastodon-tl--show-tag-timeline tag))) + (mastodon-tl--show-tag-timeline prefix tag))) + +(defun mastodon-tl--show-tag-timeline (&optional prefix tag) + "Opens a new buffer showing the timeline of posts with hastag TAG. +With a single PREFIX arg, only show posts with media. +With a double PREFIX arg, limit results to your own instance." + (let ((params + `(("limit" . ,mastodon-tl--timeline-posts-count)))) + ;; avoid adding 'nil' to our params alist: + (when (eq prefix 4) + (push '("only_media" . "true") params)) + (when (eq prefix 16) + (push '("local" . "true") params)) + (mastodon-tl--init (concat "tag-" tag) + (concat "timelines/tag/" tag) + 'mastodon-tl--timeline + nil + params))) -(defun mastodon-tl--show-tag-timeline (tag) - "Opens a new buffer showing the timeline of posts with hastag TAG." - (mastodon-tl--init - (concat "tag-" tag) (concat "timelines/tag/" tag) - 'mastodon-tl--timeline nil - `(("limit" . ,mastodon-tl--timeline-posts-count)))) ;;; BYLINES, etc. @@ -2063,7 +2076,7 @@ If TAG is provided, unfollow it." (tag (completing-read "Tag: " tags nil))) (if (null tag) (message "You have to follow some tags first.") - (mastodon-tl--get-tag-timeline tag)))) + (mastodon-tl--get-tag-timeline nil tag)))) ;;; UPDATING, etc. -- cgit v1.2.3 From 08dc0d1990754a94cf2dc0899c8a579bb485c377 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 17:09:24 +0200 Subject: timeline of all followed tags. FIX #409. --- README.org | 1 + lisp/mastodon-tl.el | 22 ++++++++++++++++++---- lisp/mastodon.el | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index fbff0cd..fa1afcb 100644 --- a/README.org +++ b/README.org @@ -136,6 +136,7 @@ not contain =:client_id= and =:client_secret=. | =U= | update your profile bio note | | =;= | view instance description for toot at point | | =:= | view followed tags and load a tag timeline | +| =M-:= | view timeline of all followed tags | | =,= | view favouriters of toot at point | | =.= | view boosters of toot at point | | =/= | switch between mastodon buffers | diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 0c3630b..46ea5da 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -400,6 +400,7 @@ With a double PREFIX arg, limit results to your own instance." (defun mastodon-tl--show-tag-timeline (&optional prefix tag) "Opens a new buffer showing the timeline of posts with hastag TAG. +If TAG is a list, show a timeline for all tags. With a single PREFIX arg, only show posts with media. With a double PREFIX arg, limit results to your own instance." (let ((params @@ -409,13 +410,18 @@ With a double PREFIX arg, limit results to your own instance." (push '("only_media" . "true") params)) (when (eq prefix 16) (push '("local" . "true") params)) - (mastodon-tl--init (concat "tag-" tag) - (concat "timelines/tag/" tag) + (when (listp tag) + (let ((list (mastodon-http--build-array-params-alist "any[]" (cdr tag)))) + (while list + (push (pop list) params)))) + (mastodon-tl--init (concat "tag-" (if (listp tag) "followed-tags" tag)) + (concat "timelines/tag/" (if (listp tag) + ;; endpoint needs to be /tag/:sometag + (car tag) tag)) 'mastodon-tl--timeline nil params))) - ;;; BYLINES, etc. @@ -899,7 +905,7 @@ Used for hitting RET on a given link." (cond ((eq link-type 'content-warning) (mastodon-tl--toggle-spoiler-text position)) ((eq link-type 'hashtag) - (mastodon-tl--show-tag-timeline (get-text-property position 'mastodon-tag))) + (mastodon-tl--show-tag-timeline nil (get-text-property position 'mastodon-tag))) ;; 'account / 'account-id is not set for mentions, only bylines ((eq link-type 'user-handle) (let ((account-json (get-text-property position 'account)) @@ -2078,6 +2084,14 @@ If TAG is provided, unfollow it." (message "You have to follow some tags first.") (mastodon-tl--get-tag-timeline nil tag)))) +(defun mastodon-tl--followed-tags-timeline () + "Open a timeline of all your followed tags." + (interactive) + (let* ((followed-tags-json (mastodon-tl--followed-tags)) + (tags (mastodon-tl--map-alist 'name followed-tags-json))) + (mastodon-tl--show-tag-timeline nil tags))) + + ;;; UPDATING, etc. diff --git a/lisp/mastodon.el b/lisp/mastodon.el index ef0d2c0..1b975f2 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -64,6 +64,7 @@ (autoload 'mastodon-profile--view-favourites "mastodon-profile") (autoload 'mastodon-tl--block-user "mastodon-tl") (autoload 'mastodon-tl--follow-user "mastodon-tl") +(autoload 'mastodon-tl--followed-tags-timeline "mastodon-tl") (autoload 'mastodon-tl--get-buffer-type "mastodon-tl") (autoload 'mastodon-tl--get-federated-timeline "mastodon-tl") (autoload 'mastodon-tl--get-home-timeline "mastodon-tl") @@ -152,6 +153,7 @@ Use. e.g. \"%c\" for your locale's date and time format." ;; navigation between timelines (define-key map (kbd "#") #'mastodon-tl--get-tag-timeline) (define-key map (kbd ":") #'mastodon-tl--list-followed-tags) + (define-key map (kbd "M-:") #'mastodon-tl--followed-tags-timeline) (define-key map (kbd "A") #'mastodon-profile--get-toot-author) (define-key map (kbd "F") #'mastodon-tl--get-federated-timeline) (define-key map (kbd "H") #'mastodon-tl--get-home-timeline) -- cgit v1.2.3 From 9ac865cb0c418d9a651a3e617e14ca60facc5936 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 17:24:03 +0200 Subject: prefix args for list-followed-tags and followed-tags-timelines --- lisp/mastodon-tl.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 46ea5da..794b198 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2074,22 +2074,24 @@ If TAG is provided, unfollow it." (lambda () (message "tag #%s unfollowed!" tag))))) -(defun mastodon-tl--list-followed-tags () - "List followed tags. View timeline of tag user choses." - (interactive) +(defun mastodon-tl--list-followed-tags (&optional prefix) + "List followed tags. View timeline of tag user choses. +Prefix is sent to `mastodon-tl--get-tag-timeline', which see." + (interactive "p") (let* ((followed-tags-json (mastodon-tl--followed-tags)) (tags (mastodon-tl--map-alist 'name followed-tags-json)) (tag (completing-read "Tag: " tags nil))) (if (null tag) (message "You have to follow some tags first.") - (mastodon-tl--get-tag-timeline nil tag)))) + (mastodon-tl--get-tag-timeline prefix tag)))) -(defun mastodon-tl--followed-tags-timeline () - "Open a timeline of all your followed tags." - (interactive) +(defun mastodon-tl--followed-tags-timeline (&optional prefix) + "Open a timeline of all your followed tags. +Prefix is sent to `mastodon-tl--show-tag-timeline', which see." + (interactive "p") (let* ((followed-tags-json (mastodon-tl--followed-tags)) (tags (mastodon-tl--map-alist 'name followed-tags-json))) - (mastodon-tl--show-tag-timeline nil tags))) + (mastodon-tl--show-tag-timeline prefix tags))) -- cgit v1.2.3 From f49b79d520d6650596cd3ea25e69ce6d562a2040 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 18:44:43 +0200 Subject: ert-helper: search before mastodon.el --- test/ert-helper.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ert-helper.el b/test/ert-helper.el index 984a8ae..9c85dfb 100644 --- a/test/ert-helper.el +++ b/test/ert-helper.el @@ -1,6 +1,7 @@ (load-file "lisp/mastodon-http.el") (load-file "lisp/mastodon-iso.el") (load-file "lisp/mastodon-toot.el") +(load-file "lisp/mastodon-search.el") (load-file "lisp/mastodon.el") (load-file "lisp/mastodon-search.el") (load-file "lisp/mastodon-client.el") @@ -10,7 +11,6 @@ (load-file "lisp/mastodon-media.el") (load-file "lisp/mastodon-notifications.el") (load-file "lisp/mastodon-profile.el") -(load-file "lisp/mastodon-search.el") (load-file "lisp/mastodon-tl.el") (load-file "lisp/mastodon-async.el") -- cgit v1.2.3 From e4ccc526baf011ad60ef978aef83de2ee2e9f506 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 1 Apr 2023 22:08:19 +0200 Subject: move followed-tags-tl binding --- lisp/mastodon.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 1b975f2..5426c1f 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -153,7 +153,7 @@ Use. e.g. \"%c\" for your locale's date and time format." ;; navigation between timelines (define-key map (kbd "#") #'mastodon-tl--get-tag-timeline) (define-key map (kbd ":") #'mastodon-tl--list-followed-tags) - (define-key map (kbd "M-:") #'mastodon-tl--followed-tags-timeline) + (define-key map (kbd "C-:") #'mastodon-tl--followed-tags-timeline) (define-key map (kbd "A") #'mastodon-profile--get-toot-author) (define-key map (kbd "F") #'mastodon-tl--get-federated-timeline) (define-key map (kbd "H") #'mastodon-tl--get-home-timeline) -- cgit v1.2.3 From f60859270753b6f2e6ef764e38c9952d5018df50 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 4 Apr 2023 10:05:06 +0200 Subject: no mastodon mode for view instance desc, so q works nicely --- lisp/mastodon-views.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index b55091f..e3fa280 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -811,7 +811,9 @@ INSTANCE is the instance were are working with." (assoc 'rules response) (assoc 'stats response)))) (mastodon-views--print-json-keys response) - (mastodon-mode) + ;; (mastodon-mode) ; breaks our 'q' binding that avoids leaving + ;; split window + (setq mastodon-account--data account) (mastodon-tl--set-buffer-spec (buffer-name buf) "instance" nil) -- cgit v1.2.3 From 4806043ea015d5e6a7a16ceaabd48126c877ea70 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 4 Apr 2023 10:26:26 +0200 Subject: ignore elsa files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 86d96be..ad98902 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ dist/ /mastodon-pkg.el /mastodon-autoloads.el /lisp/mastodon-autoloads.el + +# ELSA files +/lisp/.elsa/ \ No newline at end of file -- cgit v1.2.3 From 9497fbd4b4f20b8423e80f2c785951942a141cf7 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 5 Apr 2023 09:58:02 +0200 Subject: rejig polls for pleroma compat --- lisp/mastodon-toot.el | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index a1e6ed3..c2c391d 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1175,22 +1175,25 @@ which is used to attach it to a toot when posting." mastodon-toot--media-attachments)) (list "None"))) -(defun mastodon-toot--fetch-max-poll-options () - "Return the maximum number of poll options." - (mastodon-toot--fetch-poll-field 'max_options)) - -(defun mastodon-toot--fetch-max-poll-option-chars () - "Return the maximum number of characters a poll option may have." - (or (mastodon-toot--fetch-poll-field 'max_characters_per_option) - 50)) ; masto default - -(defun mastodon-toot--fetch-poll-field (field) - "Return FIELD from the poll settings from the user's instance." - (let* ((instance (mastodon-http--get-json (mastodon-http--api "instance")))) - (alist-get field - (alist-get 'polls - (alist-get 'configuration instance) - instance)))) +(defun mastodon-toot--fetch-max-poll-options (instance) + "Return the maximum number of poll options from INSTANCE, which is json." + (mastodon-toot--fetch-poll-field 'max_options instance)) + +(defun mastodon-toot--fetch-max-poll-option-chars (instance) + "Return the maximum number of characters a poll option may have. +INSTANCE is JSON." + (if (alist-get 'pleroma instance) + (mastodon-toot--fetch-poll-field 'max_option_chars instance) + (or (mastodon-toot--fetch-poll-field 'max_characters_per_option instance) + 50))) ; masto default + +(defun mastodon-toot--fetch-poll-field (field instance) + "Return FIELD from the poll settings from INSTANCE, which is json." + (let* ((polls (if (alist-get 'pleroma instance) + (alist-get 'poll_limits instance) + (alist-get 'polls + (alist-get 'configuration instance))))) + (alist-get field polls))) (defun mastodon-toot--read-poll-options-count (max) "Read the user's choice of the number of options the poll should have. @@ -1205,15 +1208,17 @@ MAX is the maximum number set by their instance." "Prompt for new poll options and return as a list." (interactive) ;; re length, API docs show a poll 9 options. - (let* ((max-options (mastodon-toot--fetch-max-poll-options)) + (let* ((instance (mastodon-http--get-json (mastodon-http--api "instance"))) + (max-options (mastodon-toot--fetch-max-poll-options instance)) (count (mastodon-toot--read-poll-options-count max-options)) - (length (mastodon-toot--fetch-max-poll-option-chars)) + (length (mastodon-toot--fetch-max-poll-option-chars instance)) (multiple-p (y-or-n-p "Multiple choice? ")) (options (mastodon-toot--read-poll-options count length)) (hide-totals (y-or-n-p "Hide votes until poll ends? ")) - (expiry (mastodon-toot--get-poll-expiry))) + (expiry (mastodon-toot--read-poll-expiry))) (setq mastodon-toot-poll - `(:options ,options :length ,length :multi ,multiple-p :hide ,hide-totals :expiry ,expiry)) + `(:options ,options :length ,length :multi ,multiple-p + :hide ,hide-totals :expiry ,expiry)) (message "poll created!"))) (defun mastodon-toot--read-poll-options (count length) @@ -1222,7 +1227,7 @@ LENGTH is the maximum character length allowed for a poll option." (cl-loop for x from 1 to count collect (read-string (format "Poll option [%s/%s] [max %s chars]: " x count length)))) -(defun mastodon-toot--get-poll-expiry () +(defun mastodon-toot--read-poll-expiry () "Prompt for a poll expiry time." ;; API requires this in seconds (let* ((options (mastodon-toot--poll-expiry-options-alist)) -- cgit v1.2.3 From 91c8612beaa73367f08245fbe54d85c3db8c13cc Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 5 Apr 2023 10:04:52 +0200 Subject: change package description --- lisp/mastodon.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 5426c1f..89f5cf4 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -1,4 +1,4 @@ -;;; mastodon.el --- Client for Mastodon, a federated social network -*- lexical-binding: t -*- +;;; mastodon.el --- Client for Mastodon and compatible fediverse services -*- lexical-binding: t -*- ;; Copyright (C) 2017-2019 Johnson Denen ;; Copyright (C) 2020-2022 Marty Hiatt -- cgit v1.2.3 From ccf2d8d5cdf1655888292c2ce7dd45c86de4e805 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 5 Apr 2023 11:31:11 +0200 Subject: view instance: only look for property-json in profile buf. prevents the loading of older toots if called on last toot in buffer. --- lisp/mastodon-views.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index e3fa280..38344b3 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -769,10 +769,14 @@ INSTANCE is an instance domain name." ;; be looking at toots/boosts/users in a profile buffer. ;; profile-json works as a defacto test for if point is on the ;; profile details at the top of a profile buffer. - (url (if (mastodon-tl--property 'profile-json) + (url (if (and (mastodon-tl--profile-buffer-p) + ;; only call this in profile buffers: + (mastodon-tl--property 'profile-json)) (alist-get 'url toot) ; profile description (alist-get 'url account))) - (username (if (mastodon-tl--property 'profile-json) + (username (if (and (mastodon-tl--profile-buffer-p) + ;; only call this in profile buffers: + (mastodon-tl--property 'profile-json)) (alist-get 'username toot) ;; profile (alist-get 'username account))) (instance (mastodon-views--get-instance-url url username instance)) -- cgit v1.2.3 From c6acfe694d3c2e0468c98478775442f8710de7e1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 5 Apr 2023 13:02:40 +0200 Subject: read me re view all followed tags binding --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index fa1afcb..3ddea70 100644 --- a/README.org +++ b/README.org @@ -136,7 +136,7 @@ not contain =:client_id= and =:client_secret=. | =U= | update your profile bio note | | =;= | view instance description for toot at point | | =:= | view followed tags and load a tag timeline | -| =M-:= | view timeline of all followed tags | +| =C-:= | view timeline of all followed tags | | =,= | view favouriters of toot at point | | =.= | view boosters of toot at point | | =/= | switch between mastodon buffers | -- cgit v1.2.3