From 2b624abe68a71d5a1b9c8f29d4dd8c0fa147b144 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 23 Mar 2023 11:44:40 +0100 Subject: update info from readme --- mastodon.info | 50 ++++++++++++++++++++++++++------------------------ mastodon.texi | 16 ++++++++++------ 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/mastodon.info b/mastodon.info index 3744169..b1b679c 100644 --- a/mastodon.info +++ b/mastodon.info @@ -215,8 +215,8 @@ your ‘mastodon-token-file’ does not contain ‘:client_id’ and *Help* ‘?’ Show discover menu of all bindings, if ‘discover’ is available *Timeline actions* - ‘n’ Go to next item (toot, notification) - ‘p’ Go to previous item (toot, notification) + ‘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 @@ -232,17 +232,19 @@ your ‘mastodon-token-file’ does not contain ‘:client_id’ and ‘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) + ‘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 + ‘S’ view your scheduled toots *Toot actions* ‘t’ Compose a new toot ‘c’ Toggle content warning content @@ -260,7 +262,7 @@ your ‘mastodon-token-file’ does not contain ‘:client_id’ and ‘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, followers, following, and statuses without boosts + ‘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 @@ -597,7 +599,7 @@ File: mastodon.info, Node: Supporting mastodonel, Next: Contributors, Prev: C ============================ If you’d like to support continued development of ‘mastodon.el’, I -accept donations via paypal: paypal.me/martianh +accept donations via paypal: https://paypal.me/martianh (https://paypal.me/martianh). If you would prefer a different payment method, write to me at that address and I can provide IBAN or other details. @@ -634,24 +636,24 @@ Node: Usage3098 Node: Logging in to your instance3508 Node: Timelines4505 Ref: Keybindings4980 -Ref: Toot byline legend9098 -Node: Composing toots9370 -Ref: Keybindings (1)10947 -Ref: Draft toots11465 -Node: Other commands and account settings11936 -Node: Customization14759 -Node: Alternative timeline layout15545 -Node: Live-updating timelines mastodon-async-mode15922 -Node: Translating toots16758 -Node: bookmarks and mastodonel17930 -Node: Dependencies18400 -Node: Network compatibility18992 -Node: Contributing19478 -Node: Bug reports19767 -Node: Fixes and features20673 -Node: Coding style21156 -Node: Supporting mastodonel21780 -Node: Contributors22302 +Ref: Toot byline legend9253 +Node: Composing toots9525 +Ref: Keybindings (1)11102 +Ref: Draft toots11620 +Node: Other commands and account settings12091 +Node: Customization14914 +Node: Alternative timeline layout15700 +Node: Live-updating timelines mastodon-async-mode16077 +Node: Translating toots16913 +Node: bookmarks and mastodonel18085 +Node: Dependencies18555 +Node: Network compatibility19147 +Node: Contributing19633 +Node: Bug reports19922 +Node: Fixes and features20828 +Node: Coding style21311 +Node: Supporting mastodonel21935 +Node: Contributors22465  End Tag Table diff --git a/mastodon.texi b/mastodon.texi index 0ede329..577f133 100644 --- a/mastodon.texi +++ b/mastodon.texi @@ -224,9 +224,9 @@ not contain @samp{:client_id} and @samp{:client_secret}. @item @tab @strong{Timeline actions} @item @samp{n} -@tab Go to next item (toot, notification) +@tab Go to next item (toot, notification, user) @item @samp{p} -@tab Go to previous item (toot, notification) +@tab Go to previous item (toot, notification, user) @item @samp{M-n=/=} @tab Go to the next interesting thing that has an action @item @samp{M-p=/=} @@ -257,13 +257,17 @@ not contain @samp{:client_id} and @samp{:client_secret}. @tab update your profile bio note @item @samp{;} @tab view instance description for toot at point +@item @samp{:} +@tab view followed tags and load a tag timeline @item @samp{,} @tab view favouriters of toot at point @item @samp{.} @tab view boosters of toot at point +@item @samp{/} +@tab switch between mastodon buffers @item @tab @strong{Other views} -@item @samp{S} +@item @samp{s} @tab search (posts, users, tags) (NB: only posts you have interacted with) @item @samp{I}, @samp{c}, @samp{d} @tab view, create, and delete filters @@ -277,7 +281,7 @@ not contain @samp{:client_id} and @samp{:client_secret}. @tab view bookmarked toots @item @samp{X} @tab view/edit/create/delete lists -@item @samp{s} +@item @samp{S} @tab view your scheduled toots @item @tab @strong{Toot actions} @@ -314,7 +318,7 @@ not contain @samp{:client_id} and @samp{:client_secret}. @item @tab @strong{Profile view} @item @samp{C-c C-c} -@tab cycle between statuses, followers, following, and statuses without boosts +@tab cycle between statuses, statuses without boosts, followers, and following @item @tab @samp{mastodon-profile--account-account-to-list} (see lists view) @item @@ -712,7 +716,7 @@ There's no need for a blank line after the first docstring line (one is added au @section Supporting @samp{mastodon.el} If you'd like to support continued development of @samp{mastodon.el}, I accept -donations via paypal: @uref{https://paypal.me/martianh, paypal.me/martianh}. If you would +donations via paypal: @uref{https://paypal.me/martianh, https://paypal.me/martianh}. If you would prefer a different payment method, write to me at that address and I can provide IBAN or other details. -- cgit v1.2.3 From f42a3aea506b5258dcf3e2b55d211d89f68a6c8a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 23 Mar 2023 15:11:58 +0100 Subject: make list-follow-tags idiot proof --- lisp/mastodon-tl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 644a3d4..f557282 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2037,8 +2037,10 @@ If TAG is provided, unfollow it." (interactive) (let* ((followed-tags-json (mastodon-tl--followed-tags)) (tags (mastodon-tl--map-alist 'name followed-tags-json)) - (tag (completing-read "Tag: " tags))) - (mastodon-tl--get-tag-timeline tag))) + (tag (completing-read "Tag: " tags nil))) + (if (null tag) + (message "You have to follow some tags first.") + (mastodon-tl--get-tag-timeline tag)))) ;;; UPDATING, etc. -- cgit v1.2.3 From 300d86f617f80e22a2926313f62ddbd06b992630 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 23 Mar 2023 23:25:14 +0100 Subject: replace hypen horiz-bars with unicode masto-tl--horiz-bar if poss --- lisp/mastodon-profile.el | 10 +++++----- lisp/mastodon-search.el | 16 ++++++++-------- lisp/mastodon-tl.el | 21 +++++++++++++-------- lisp/mastodon-views.el | 8 ++++---- 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 74f9b62..7fb36ad 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -642,7 +642,7 @@ HEADERS means also fetch link headers for pagination." (if (equal locked t) (concat " " (mastodon-tl--symbol 'locked)) "") - "\n ------------\n" + "\n " mastodon-tl--horiz-bar "\n" ;; profile note: ;; account here to enable tab-stops in profile note (mastodon-tl--render-text note account) @@ -662,11 +662,11 @@ HEADERS means also fetch link headers for pagination." 'profile-json account) ;; insert counts (mastodon-tl--set-face - (concat " ------------\n" + (concat " " mastodon-tl--horiz-bar "\n" " TOOTS: " toots-count " | " "FOLLOWERS: " followers-count " | " "FOLLOWING: " following-count "\n" - " ------------\n\n") + " " mastodon-tl--horiz-bar "\n\n") 'success) ;; insert relationship (follows) (if followsp @@ -682,9 +682,9 @@ HEADERS means also fetch link headers for pagination." "") ; if no followsp we still need str-or-char-p for insert ;; insert endpoint (mastodon-tl--set-face - (concat " ------------\n" + (concat " " mastodon-tl--horiz-bar "\n" endpoint-name "\n" - " ------------\n") + " " mastodon-tl--horiz-bar "\n") 'success)) (setq mastodon-tl--update-point (point)) (mastodon-media--inline-images (point-min) (point)) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index b5900c7..3555238 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -97,9 +97,9 @@ QUERY is the string to search." nil) ;; hashtag results: (insert (mastodon-tl--set-face - (concat "\n ------------\n" + (concat "\n " mastodon-tl--horiz-bar "\n" " TRENDING HASHTAGS\n" - " ------------\n\n") + " " mastodon-tl--horiz-bar "\n\n") 'success)) (mastodon-search--print-tags-list tags))))) @@ -135,23 +135,23 @@ QUERY is the string to search." nil) ;; user results: (insert (mastodon-tl--set-face - (concat "\n ------------\n" + (concat "\n " mastodon-tl--horiz-bar "\n" " USERS\n" - " ------------\n\n") + " " mastodon-tl--horiz-bar "\n\n") 'success)) (mastodon-search--insert-users-propertized accts :note) ;; hashtag results: (insert (mastodon-tl--set-face - (concat "\n ------------\n" + (concat "\n " mastodon-tl--horiz-bar "\n" " HASHTAGS\n" - " ------------\n\n") + " " mastodon-tl--horiz-bar "\n\n") 'success)) (mastodon-search--print-tags-list tags-list) ;; status results: (insert (mastodon-tl--set-face - (concat "\n ------------\n" + (concat "\n " mastodon-tl--horiz-bar "\n" " STATUSES\n" - " ------------\n") + " " mastodon-tl--horiz-bar "\n") 'success)) (mapc #'mastodon-tl--toot toots-list-json) (goto-char (point-min)))))) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index f557282..fbee377 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -189,6 +189,10 @@ If nil `(point-min)' is used instead.") (defvar-local mastodon-tl--timestamp-update-timer nil "The timer that, when set will scan the buffer to update the timestamps.") +(defvar mastodon-tl--horiz-bar + (if (char-displayable-p ?―) + (make-string 12 ?―) + (make-string 12 ?-))) ;;; KEYMAPS @@ -625,7 +629,8 @@ this just means displaying toot client." (mastodon-tl--relative-time-description edited-parsed) edited-parsed))) "") - (propertize "\n ------------" 'face 'default) + (propertize (concat "\n " mastodon-tl--horiz-bar) + 'face 'default) (if mastodon-tl--show-stats (mastodon-tl--toot-stats toot) "") @@ -962,13 +967,13 @@ message is a link which unhides/hides the main body." (mastodon-tl--clean-tabs-and-nl (mastodon-tl--render-text spoiler toot)) 'default)) - (message (concat ;"\n" - " ---------------\n" - " " (mastodon-tl--make-link - (concat "CW: " string) - 'content-warning) - "\n" - " ---------------\n")) + (message (concat + " " mastodon-tl--horiz-bar "\n " + (mastodon-tl--make-link + (concat "CW: " string) + 'content-warning) + "\n " + mastodon-tl--horiz-bar "\n")) (cw (mastodon-tl--set-face message 'mastodon-cw-face))) (concat cw diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 22eac7e..97ef082 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -163,10 +163,10 @@ This function is used as the update-function to provides the JSON data." (erase-buffer) (insert (mastodon-tl--set-face - (concat "\n ------------\n " + (concat "\n " mastodon-tl--horiz-bar "\n " (upcase view-name) - "\n" - " ------------\n\n") + "\n " + mastodon-tl--horiz-bar "\n\n") 'success) (if bindings-string (mastodon-tl--set-face @@ -215,7 +215,7 @@ provides the JSON data." (mastodon-tl--map-alist 'title lists))) (mapc (lambda (x) (mastodon-views--print-list-accounts x) - (insert (propertize " ------------\n\n" + (insert (propertize (concat " " mastodon-tl--horiz-bar "\n\n") 'face 'success))) lists-names))) -- cgit v1.2.3 From c63bae68e445135882a2454c03ea28c3e13095cc Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 24 Mar 2023 09:07:50 +0100 Subject: FIX #419. call instance description on account listings fix --- lisp/mastodon-views.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 97ef082..9c016c3 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -733,22 +733,23 @@ INSTANCE is an instance domain name." (mastodon-views--instance-response-fun response brief instance)) (mastodon-tl--do-if-toot (let* ((toot (if (mastodon-tl--profile-buffer-p) - ;; we may be on profile itself: + ;; we may be on profile description itself: (or (mastodon-tl--property 'profile-json) ;; or on profile account listings, which use toot-json: ;; or just toots: (mastodon-tl--property 'toot-json)) - ;; normal timeline: + ;; normal timeline/account listing: (mastodon-tl--property 'toot-json))) (reblog (alist-get 'reblog toot)) (account (or (alist-get 'account reblog) - (alist-get 'account toot))) + (alist-get 'account toot) + toot)) ; else `toot' is already an account listing. ;; we can't use --profile-buffer-p as our test here because we may - ;; be looking at toots/boosts/users in a profile buffer + ;; 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) - (alist-get 'url toot) ; profile + (alist-get 'url toot) ; profile description (alist-get 'url account))) (username (if (mastodon-tl--property 'profile-json) (alist-get 'username toot) ;; profile -- cgit v1.2.3 From 93ef38d88b277e8d5991e887034a7622879c91b1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 24 Mar 2023 09:33:37 +0100 Subject: FIX #418. set-cw check for nil as well as string-empty set-cw is called by setup-as-reply, which always runs in --compose-buffer. perhaps it shouldn't. --- lisp/mastodon-toot.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 82a9482..65fc357 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -591,7 +591,8 @@ NO-REDRAFT means delete toot only." (defun mastodon-toot--set-cw (&optional cw) "Set content warning to CW if it is non-nil." - (unless (string-empty-p cw) + (unless (or (null cw) ; cw is nil for `mastodon-tl--dm-user' + (string-empty-p cw)) (setq mastodon-toot--content-warning t) (setq mastodon-toot--content-warning-from-reply-or-redraft cw))) @@ -1637,6 +1638,10 @@ EDIT means we are editing an existing toot, not composing a new one." (mastodon-toot--display-docs-and-status-fields (when mastodon-toot-display-orig-in-reply-buffer reply-text)) + ;; `reply-to-user' (alone) is also used by `mastodon-tl--dm-user', so + ;; perhaps we should not always call --setup-as-reply, or make its + ;; workings conditional on reply-to-id. currently it only checks for + ;; reply-to-user. (mastodon-toot--setup-as-reply reply-to-user reply-to-id reply-json)) (unless mastodon-toot--max-toot-chars ;; no need to fetch from `mastodon-profile-account-settings' as -- cgit v1.2.3