From 445d176b2a593a87afd3f6bca717feba639dfbdc Mon Sep 17 00:00:00 2001 From: Rahguzar Date: Sat, 6 Jan 2024 12:32:57 +0100 Subject: Replace 'switch-to-buffer' with 'display-buffer' or 'pop-to-buffer' This allows user to customize how buffers get shown using 'display-buffer-alist'. Also refactors mastodon-auth--show-notice. --- lisp/mastodon-tl.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 561087e..d4f3d04 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -287,7 +287,7 @@ It is active where point is placed by `mastodon-tl--goto-next-item.'") "Evaluate BODY in a new or existing buffer called BUFFER. MODE-FUN is called to set the major mode. OTHER-WINDOW means call `switch-to-buffer-other-window' rather -than `switch-to-buffer'." +than `pop-to-buffer'." (declare (debug t) (indent 3)) `(with-current-buffer (get-buffer-create ,buffer) @@ -296,7 +296,7 @@ than `switch-to-buffer'." (funcall ,mode-fun) (if ,other-window (switch-to-buffer-other-window ,buffer) - (switch-to-buffer ,buffer)) + (pop-to-buffer ,buffer '(display-buffer-same-window))) ,@body))) (defmacro mastodon-tl--do-if-item (&rest body) -- cgit v1.2.3 From a01eec0d57ed64f8a83784cd48e44fc2961e0d64 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 7 Feb 2024 21:02:53 +0100 Subject: message appropriately for foll req --- lisp/mastodon-tl.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 3d8e8dd..d462918 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2149,7 +2149,10 @@ ARGS is an alist of any parameters to send with the request." (mapconcat #'cdr args " "))) ((and (eq notify nil) (eq reblogs nil)) - (message "User %s (@%s) %sed!" name user-handle action)))))))) + (if (and (equal action "follow") + (eq t (alist-get 'requested json))) + (message "Follow requested for user %s (@%s)!" name user-handle) + (message "User %s (@%s) %sed!" name user-handle action))))))))) ;; FOLLOW TAGS -- cgit v1.2.3 From 9caa0b58ea67d807d65e48a7f7e8599644351eb7 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 15 Feb 2024 18:11:37 +0100 Subject: docstrings --- lisp/mastodon-tl.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d21edaf..7d6243f 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2215,7 +2215,8 @@ PREFIX is sent to `mastodon-tl--get-tag-timeline', which see." (defun mastodon-tl--followed-tags-timeline (&optional prefix) "Open a timeline of multiple tags. -PREFIX is sent to `mastodon-tl--show-tag-timeline', which see. +With a single PREFIX arg, only show posts with media. +With a double PREFIX arg, limit results to your own instance. If `mastodon-tl--tag-timeline-tags' is set, use its tags, else fetch followed tags and load the first four of them." (interactive "p") @@ -2748,7 +2749,7 @@ JSON and http headers, without it just the JSON." "Initialize BUFFER-NAME with timeline targeted by ENDPOINT. UPDATE-FUNCTION is used to receive more toots. Runs synchronously. -Optional arg NOTE-TYPE means only get that type of note. +Optional arg NOTE-TYPE means only get that type of notification. PARAMS is an alist of any params to include in the request. HEADERS are any headers to send in the request. VIEW-NAME is a string, to be used as a heading for the view. -- cgit v1.2.3 From 58ec54b6663c82da6ec87c6f3d1016db4442d3dc Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 20 Feb 2024 19:41:41 +0100 Subject: update: skip scheduled-statuses view --- lisp/mastodon-tl.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 7d6243f..29dce60 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2683,6 +2683,7 @@ This location is defined by a non-nil value of (mastodon-tl--buffer-type-eq 'follow-suggestions) (mastodon-tl--buffer-type-eq 'lists) (mastodon-tl--buffer-type-eq 'filters) + (mastodon-tl--buffer-type-eq 'scheduled-statuses) (mastodon-tl--search-buffer-p)) (message "update not available in this view.") ;; FIXME: handle update for search and trending buffers -- cgit v1.2.3 From 96866e176e469811642b66b971f3125f040de5de Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 22 Feb 2024 12:36:20 +0100 Subject: remove stray or clauses in tl--goto-item-pos --- lisp/mastodon-tl.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 29dce60..856325e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -368,21 +368,22 @@ text, i.e. hidden spoiler text." "Search for item with function FIND-POS. If search returns nil, execute REFRESH function. Optionally start from POS." - (let* ((npos (or ; toot/user items have byline: - (funcall find-pos - (or pos (point)) - ;; 'item-type ; breaks nav to last item in a view? - 'byline - (current-buffer))))) + (let* ((npos ; toot/user items have byline: + (funcall find-pos + (or pos (point)) + ;; FIXME: we need to fix item-type? + ;; 'item-type ; breaks nav to last item in a view? + 'byline + (current-buffer)))) (if npos - (if (not (or - ;; (get-text-property npos 'item-id) ; toots, users, not tags - (get-text-property npos 'item-type))) ; generic + (if (not + ;; (get-text-property npos 'item-id) ; toots, users, not tags + (get-text-property npos 'item-type)) ; generic (mastodon-tl--goto-item-pos find-pos refresh npos) (goto-char npos) ;; force display of help-echo on moving to a toot byline: (mastodon-tl--message-help-echo)) - ;; FIXME: this doesn't really work, as the funcall doesn't return if we + ;; FIXME: this doesn't work, as the funcall doesn't return if we ;; run into an endless refresh loop (condition-case nil (funcall refresh) -- cgit v1.2.3