branch: elpa/mastodon
commit 24e958447374fe0c63a8e73aa2a5b2431a2a9e00
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
add mastodon-tl--tag-group-timeline cmd and mastodon-tl--tags-groups
customize.
---
lisp/mastodon-tl.el | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 191ea7d8d3..f2d0d09f86 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2879,6 +2879,25 @@ PREFIX is for `mastodon-tl--show-tag-timeline', which
see."
tags)))
(mastodon-tl--show-tag-timeline prefix selection)))
+(defcustom mastodon-tl--tags-groups nil
+ "A list containing lists of up to four tags each.
+You can load a tag timeline list with one of these by calling
+`mastodon-tl--tag-group-timeline'."
+ :group 'mastodon-tl
+ :type '(repeat (list string string string string)))
+
+(defun mastodon-tl--tag-group-timeline (&optional prefix)
+ "Load a timeline of a tag group from `mastodon-tl--tags-groups'.
+PREFIX is for `mastodon-tl--show-tag-timeline', which see."
+ (interactive "P")
+ (let* ((list-strs (mapcar (lambda (x)
+ ;; cons of list-as-string and list:
+ (cons (prin1-to-string x) x))
+ mastodon-tl--tags-groups))
+ (choice (completing-read "Tag group: " list-strs))
+ (choice-list (cdr (assoc choice list-strs #'equal))))
+ (mastodon-tl--show-tag-timeline prefix choice-list)))
+
;;; REPORT TO MODERATORS