From 5d1e5edd0709a70c81a9fc846ff3292a9a270544 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 9 Jan 2023 16:06:20 +1100 Subject: remove first empty line in docstrings --- lisp/mastodon.el | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index a6ee4bc..cd7dd8e 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -61,7 +61,6 @@ (autoload 'mastodon-profile--make-author-buffer "mastodon-profile") (autoload 'mastodon-profile--show-user "mastodon-profile") (autoload 'mastodon-discover "mastodon-discover") - (autoload 'mastodon-tl--block-user "mastodon-tl") (autoload 'mastodon-tl--unblock-user "mastodon-tl") (autoload 'mastodon-tl--mute-user "mastodon-tl") @@ -107,7 +106,6 @@ (defcustom mastodon-instance-url "https://mastodon.social" "Base URL for the Mastodon instance you want to be active. - For example, if your mastodon username is \"example_user@social.instance.org\", and you want this account to be active, the value of this variable should be @@ -123,7 +121,6 @@ changes to take effect." (defcustom mastodon-active-user nil "Username of the active user. - For example, if your mastodon username is \"example_user@social.instance.org\", and you want this account to be active, the value of this variable should be @@ -139,7 +136,6 @@ changes to take effect." (defcustom mastodon-toot-timestamp-format "%F %T" "Format to use for timestamps. - For valid formatting options see `format-time-string`. The default value \"%F %T\" prints ISO8601-style YYYY-mm-dd HH:MM:SS. Use. e.g. \"%c\" for your locale's date and time format." -- cgit v1.2.3 From 1d3f82da36a8734e5489662fc8b4a4de0de811bb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 16 Jan 2023 08:59:48 +0100 Subject: mastodon-live-buffers / mastodon-kill-all-buffers --- lisp/mastodon.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index cd7dd8e..ff9888e 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -204,6 +204,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "E") #'mastodon-toot--view-toot-edits) (when (require 'lingva nil :no-error) (define-key map (kbd "s") #'mastodon-toot--translate-toot-text)) + (define-key map (kbd "M-C-q") #'mastodon-kill-all-buffers) map) "Keymap for `mastodon-mode'.") @@ -345,6 +346,20 @@ not, just browse the URL in the normal fashion." (string-match "^/[[:alpha:]]+$" query) (string-match "^/u/[[:alpha:]]+$" query))))) +(defun mastodon-live-buffers () + "Return a list of open mastodon buffers. +Calls `mastodon-tl--get-buffer-type', which see." + (cl-loop for x in (buffer-list) + when (with-current-buffer x (mastodon-tl--get-buffer-type)) + collect (get-buffer x))) + +(defun mastodon-kill-all-buffers () + "Kill any and all open mastodon buffers, hopefully." + (interactive) + (let ((mastodon-buffers (mastodon-live-buffers))) + (cl-loop for x in mastodon-buffers + do (kill-buffer x)))) + ;;;###autoload (add-hook 'mastodon-mode-hook (lambda () (when (require 'emojify nil :noerror) -- cgit v1.2.3 From 3995df553dac02aa9cb8a3d70c062bf10d047985 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 16 Jan 2023 11:11:06 +0100 Subject: bindings: view scheduled on 's' move translate to 'a' --- lisp/mastodon-discover.el | 5 +++-- lisp/mastodon.el | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el index 8506410..f16cdf6 100644 --- a/lisp/mastodon-discover.el +++ b/lisp/mastodon-discover.el @@ -70,7 +70,7 @@ ("E" "View edits of (your) toot" mastodon-toot--view-toot-edits) ("i" "Pin/Unpin (your) toot" mastodon-toot--pin-toot-toggle) ("P" "View user profile" mastodon-profile--show-user) - ("s" "Translate toot at point" mastodon-toot--translate-toot-text) + ("a" "Translate toot at point" mastodon-toot--translate-toot-text) ("T" "View thread" mastodon-tl--thread) ("v" "Vote on poll" mastodon-tl--poll-vote)) ("Views" @@ -90,7 +90,8 @@ ("R" "View follow requests" mastodon-profile--view-follow-requests) ("G" "View follow suggestions" mastodon-tl--get-follow-suggestions) ("I" "View filters" mastodon-tl--view-filters) - ("X" "View lists" mastodon-tl--view-lists)) + ("X" "View lists" mastodon-tl--view-lists) + ("s" "View scheduled toots" mastodon-tl--view-scheduled-toots)) ("Users" ("W" "Follow" mastodon-tl--follow-user) ("C-S-W" "Unfollow" mastodon-tl--unfollow-user) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index ff9888e..384c4c3 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -203,7 +203,8 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "e") #'mastodon-toot--edit-toot-at-point) (define-key map (kbd "E") #'mastodon-toot--view-toot-edits) (when (require 'lingva nil :no-error) - (define-key map (kbd "s") #'mastodon-toot--translate-toot-text)) + (define-key map (kbd "a") #'mastodon-toot--translate-toot-text)) + (define-key map (kbd "s") #'mastodon-tl--view-scheduled-toots) (define-key map (kbd "M-C-q") #'mastodon-kill-all-buffers) map) "Keymap for `mastodon-mode'.") -- cgit v1.2.3 From bf7a1b445003f7e15d1e2b38f7635de142df19d1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 16 Jan 2023 16:05:08 +0100 Subject: view instance binding --- README.org | 127 +++++++++++++++++++++++----------------------- lisp/mastodon-discover.el | 3 +- lisp/mastodon.el | 1 + 3 files changed, 67 insertions(+), 64 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/README.org b/README.org index 6bed845..e182aa7 100644 --- a/README.org +++ b/README.org @@ -107,69 +107,70 @@ not contain =:client_id= and =:client_secret=. **** 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=/== | 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 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 | -|----------------+-----------------------------------------------------------------------| -| | *Profile view* | +|----------------+---------------------------------------------------------------------------| +| 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=/== | 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 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 | +| =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, 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 | -|----------------+-----------------------------------------------------------------------| +| | =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 @@ -301,7 +302,7 @@ view a timeline with one of the commands that begin with *** Translating toots -You can translate toots with =mastodon-toot--translate-toot-text=. At the moment +You can translate toots with =mastodon-toot--translate-toot-text= (=a= in a timeline). At the moment this requires [[https://codeberg.org/martianh/lingva.el][lingva.el]], a little interface I wrote to https://lingva.ml, to be installed to work. diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el index f16cdf6..b3819ed 100644 --- a/lisp/mastodon-discover.el +++ b/lisp/mastodon-discover.el @@ -91,7 +91,8 @@ ("G" "View follow suggestions" mastodon-tl--get-follow-suggestions) ("I" "View filters" mastodon-tl--view-filters) ("X" "View lists" mastodon-tl--view-lists) - ("s" "View scheduled toots" mastodon-tl--view-scheduled-toots)) + ("s" "View scheduled toots" mastodon-tl--view-scheduled-toots) + (";" "View instance description" mastodon-tl--view-instance-description)) ("Users" ("W" "Follow" mastodon-tl--follow-user) ("C-S-W" "Unfollow" mastodon-tl--unfollow-user) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 384c4c3..1c3136c 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -206,6 +206,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "a") #'mastodon-toot--translate-toot-text)) (define-key map (kbd "s") #'mastodon-tl--view-scheduled-toots) (define-key map (kbd "M-C-q") #'mastodon-kill-all-buffers) + (define-key map (kbd ";") #'mastodon-tl--view-instance-description) map) "Keymap for `mastodon-mode'.") -- cgit v1.2.3 From 4548acc7300a4f63c57916c3d5ee033fef5674a3 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 25 Jan 2023 17:49:50 +0100 Subject: add 'l' binding for recenter-top-bottom --- lisp/mastodon.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 1c3136c..bee3bc4 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -202,6 +202,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "@") #'mastodon-notifications--get-mentions) (define-key map (kbd "e") #'mastodon-toot--edit-toot-at-point) (define-key map (kbd "E") #'mastodon-toot--view-toot-edits) + (define-key map (kbd "l") #'recenter-top-bottom) (when (require 'lingva nil :no-error) (define-key map (kbd "a") #'mastodon-toot--translate-toot-text)) (define-key map (kbd "s") #'mastodon-tl--view-scheduled-toots) -- cgit v1.2.3 From 36b6a905957c9207b7a5b738f3744745f7b088dd Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 28 Jan 2023 13:50:32 +0100 Subject: bindings for list-toot-favouriters/boosters --- lisp/mastodon-discover.el | 4 +++- lisp/mastodon.el | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el index b3819ed..57c1aa0 100644 --- a/lisp/mastodon-discover.el +++ b/lisp/mastodon-discover.el @@ -72,7 +72,9 @@ ("P" "View user profile" mastodon-profile--show-user) ("a" "Translate toot at point" mastodon-toot--translate-toot-text) ("T" "View thread" mastodon-tl--thread) - ("v" "Vote on poll" mastodon-tl--poll-vote)) + ("v" "Vote on poll" mastodon-tl--poll-vote) + ("," "View toot's favouriters" mastodon-toot--list-toot-favouriters) + ("." "View toot's boosters" mastodon-toot--list-toot-boosters)) ("Views" ("h/?" "View mode help/keybindings" describe-mode) ("#" "Tag search" mastodon-tl--get-tag-timeline) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index bee3bc4..ebf9944 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -208,6 +208,8 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "s") #'mastodon-tl--view-scheduled-toots) (define-key map (kbd "M-C-q") #'mastodon-kill-all-buffers) (define-key map (kbd ";") #'mastodon-tl--view-instance-description) + (define-key map (kbd ",") #'mastodon-toot--list-toot-favouriters) + (define-key map (kbd ".") #'mastodon-toot--list-toot-boosters) map) "Keymap for `mastodon-mode'.") -- cgit v1.2.3 From 9b579c7e981ce37a5d6059de4e249d5d54452d6e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 18 Feb 2023 04:57:02 +0100 Subject: autoload trending-tags --- lisp/mastodon.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index ebf9944..2b620a9 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -96,6 +96,7 @@ (autoload 'mastodon-toot--view-toot-history "mastodon-tl") (autoload 'mastodon-tl--init-sync "mastodon-tl") (autoload 'mastodon-notifications--timeline "mastodon-notifications") +(autoload 'mastodon-search--trending-tags "mastodon-search") (defvar mastodon-notifications--map) -- cgit v1.2.3 From b32c59e32e41e8b94b2df8d65284f0fa508f67cd Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Feb 2023 22:36:19 +0100 Subject: autoloads --- lisp/mastodon.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 2b620a9..9cf19b2 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -97,6 +97,8 @@ (autoload 'mastodon-tl--init-sync "mastodon-tl") (autoload 'mastodon-notifications--timeline "mastodon-notifications") (autoload 'mastodon-search--trending-tags "mastodon-search") +(autoload 'mastodon-tl--view-instance-description "mastodon-tl") +(autoload 'mastodon-tl--get-buffer-type "mastodon-tl") (defvar mastodon-notifications--map) -- cgit v1.2.3 From 2143868d8214f07b8f7cb246eda07d9c7cbb73f9 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Feb 2023 22:36:26 +0100 Subject: mastodon-switch-to-buffer --- lisp/mastodon.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 9cf19b2..a49d0cc 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -368,6 +368,17 @@ Calls `mastodon-tl--get-buffer-type', which see." (cl-loop for x in mastodon-buffers do (kill-buffer x)))) +(defun mastodon-switch-to-buffer () + "Switch to a live mastodon buffer." + (interactive) + (let* ((bufs (mastodon-live-buffers)) + (buf-names (mapcar (lambda (buf) + (buffer-name buf)) + bufs)) + (choice (completing-read "Switch to mastodon buffer: " + buf-names))) + (switch-to-buffer choice))) + ;;;###autoload (add-hook 'mastodon-mode-hook (lambda () (when (require 'emojify nil :noerror) -- cgit v1.2.3