From 87e6975d7ff26aeaca1b2020dd2a3ccfd9d6e1a2 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 7 May 2023 19:52:36 +0200 Subject: audit: mastodon.el, -toot.el (started) --- lisp/mastodon.el | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index e181786..ede0662 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -306,11 +306,10 @@ from the server and load anew." (progn (switch-to-buffer buffer) (mastodon-tl--update)) (message "Loading your notifications...") - (mastodon-tl--init-sync - (or buffer-name "notifications") - "notifications" - 'mastodon-notifications--timeline - type) + (mastodon-tl--init-sync (or buffer-name "notifications") + "notifications" + 'mastodon-notifications--timeline + type) (with-current-buffer buffer (use-local-map mastodon-notifications--map))))) @@ -329,11 +328,7 @@ not, just browse the URL in the normal fashion." (mastodon-tl--property 'shr-url :no-move) (read-string "Lookup URL: ")))) (if (not (mastodon--masto-url-p query)) - ;; this doesn't work as shr-browse-url doesn't take a url arg - ;; and with no args it can't use our read-string query, but only - ;; looks for a url at point - ;; (if (equal major-mode 'mastodon-mode) - ;; (shr-browse-url query) ;; keep our shr keymap + ;; (shr-browse-url query) ; doesn't work (keep our shr keymap) (browse-url query) (message "Performing lookup...") (let* ((url (format "%s/api/v2/search" mastodon-instance-url)) -- cgit v1.2.3 From b304f59945aaadd9b7bd3a37e704a2193f43d3d6 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 5 Jun 2023 10:25:22 +0200 Subject: dm-user binding --- 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 8b76320..ce72f34 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -180,6 +180,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "v") #'mastodon-tl--poll-vote) (define-key map (kbd "E") #'mastodon-toot--view-toot-edits) (define-key map (kbd "T") #'mastodon-tl--thread) + (define-key map (kbd "m") #'mastodon-tl--dm-user) (when (require 'lingva nil :no-error) (define-key map (kbd "a") #'mastodon-toot--translate-toot-text)) (define-key map (kbd ",") #'mastodon-toot--list-toot-favouriters) -- cgit v1.2.3 From fc63be8f3f1e8bc9d2097f92bb7b4f28fe07b949 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 10 Jun 2023 14:16:25 +0200 Subject: add lemmy post regex to masto-url-p --- lisp/mastodon.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index ce72f34..a76bdf1 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -367,7 +367,8 @@ not, just browse the URL in the normal fashion." (string-match "^/profile/[[:alpha:]]+$" query) (string-match "^/p/[[:alpha:]]+/[[:digit:]]+$" query) (string-match "^/[[:alpha:]]+$" query) - (string-match "^/u/[[:alpha:]]+$" query))))) + (string-match "^/u/[[:alpha:]]+$" query) + (string-match "^/post/[[:digit:]]+$" query))))) (defun mastodon-live-buffers () "Return a list of open mastodon buffers. -- cgit v1.2.3 From 961ade55072028055ab7532d5f0976713a0dbe3a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 11 Jun 2023 18:40:03 +0200 Subject: tag bindings on ' and ", not overloading : --- lisp/mastodon-discover.el | 3 ++- lisp/mastodon.el | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el index 57c4bd1..c1d28f3 100644 --- a/lisp/mastodon-discover.el +++ b/lisp/mastodon-discover.el @@ -79,7 +79,8 @@ ("Views" ("h/?" "View mode help/keybindings" describe-mode) ("#" "Tag search" mastodon-tl--get-tag-timeline) - (":" "List followed tags" mastodon-tl--list-followed-tags) + ("\"" "List followed tags" mastodon-tl--list-followed-tags) + ("'" "Followed tags timeline" mastodon-tl--followed-tags-timeline) ("F" "Federated" mastodon-tl--get-federated-timeline) ("H" "Home" mastodon-tl--get-home-timeline) ("L" "Local" mastodon-tl--get-local-timeline) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index a76bdf1..a991726 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -155,8 +155,8 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "l") #'recenter-top-bottom) ;; 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 "C-:") #'mastodon-tl--followed-tags-timeline) + (define-key map (kbd "\"") #'mastodon-tl--list-followed-tags) + (define-key map (kbd "'") #'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 2dbc99c2a80460084190da1f2e481d737106c9a1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 20 Jun 2023 18:58:46 +0200 Subject: add a lemmy community URL to url-p --- 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 a991726..bb316e9 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -368,6 +368,7 @@ not, just browse the URL in the normal fashion." (string-match "^/p/[[:alpha:]]+/[[:digit:]]+$" query) (string-match "^/[[:alpha:]]+$" query) (string-match "^/u/[[:alpha:]]+$" query) + (string-match "^/c/[[:alnum:]]+$" query) (string-match "^/post/[[:digit:]]+$" query))))) (defun mastodon-live-buffers () -- cgit v1.2.3 From 150f4c34b85724a0dc389ce8a1e3bea52ddf1f39 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 6 Jul 2023 16:53:03 +0200 Subject: mastodon-tl--scroll-up-command --- lisp/mastodon-tl.el | 9 +++++++++ lisp/mastodon.el | 1 + 2 files changed, 10 insertions(+) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index f7f000b..44365bc 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -341,6 +341,15 @@ Optionally start from POS." (mastodon-tl--message-help-echo)) (funcall refresh)))) +(defun mastodon-tl--scroll-up-command () + "Call `scroll-up-command'. +If we hit `point-max', call `mastodon-tl--more' then `scroll-up-command'." + (interactive) + (if (not (equal (point) (point-max))) + (scroll-up-command) + (mastodon-tl--more) + (scroll-up-command))) + (defun mastodon-tl--goto-next-toot () "Jump to next toot header." (interactive) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index bb316e9..8eac782 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -216,6 +216,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (define-key map (kbd "I") #'mastodon-views--view-filters) (define-key map (kbd "G") #'mastodon-views--view-follow-suggestions) (define-key map (kbd "X") #'mastodon-views--view-lists) + (define-key map (kbd "SPC") #'mastodon-tl--scroll-up-command) map) "Keymap for `mastodon-mode'.") -- cgit v1.2.3 From ad00253d714a128e95faa9baebfb5322c3fcc378 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 6 Jul 2023 16:59:12 +0200 Subject: add lemmy comment url form to masto-url-p --- lisp/mastodon.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 8eac782..53986cf 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -370,7 +370,8 @@ not, just browse the URL in the normal fashion." (string-match "^/[[:alpha:]]+$" query) (string-match "^/u/[[:alpha:]]+$" query) (string-match "^/c/[[:alnum:]]+$" query) - (string-match "^/post/[[:digit:]]+$" query))))) + (string-match "^/post/[[:digit:]]+$" query) + (string-match "^/comment/[[:digit:]]+$" query))))) ; lemmy (defun mastodon-live-buffers () "Return a list of open mastodon buffers. -- cgit v1.2.3