aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorfap <fap-@users.noreply.github.com>2017-04-14 23:57:38 +0200
committerJohnson Denen <johnson.denen@gmail.com>2017-04-15 21:15:08 -0400
commitcb985db2f37eabd76b9c2643387b4e94009b3f88 (patch)
tree0c15935d55454e7e1172d0d6739b0e1b8182ce50 /lisp/mastodon-tl.el
parentf731da950c0f5f461c0dc23bb1cdd990ca1f7992 (diff)
Fixes #29 - Provide context menu for discover mode
* provides a `discover.el` context menu through mode-hook * moves lambdas from keymap to functions so `discover-my-major` can pick them up
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 2d2a588..19e6cd8 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -42,6 +42,27 @@
'((t (:foreground "cyan")))
"Mastodon user handle face.")
+(defun mastodon-tl--get-federated-timeline ()
+ "Opens federated timeline."
+ (interactive)
+ (mastodon-tl--get "public"))
+
+(defun mastodon-tl--get-home-timeline ()
+ "Opens home timeline."
+ (interactive)
+ (mastodon-tl--get "home"))
+
+(defun mastodon-tl--get-local-timeline ()
+ "Opens local timeline."
+ (interactive)
+ (mastodon-tl--get "public?local=true"))
+
+(defun mastodon-tl--get-tag-timeline ()
+ "Prompts for tag and opens its timeline."
+ (interactive)
+ (let ((tag (read-string "Tag: ")))
+ (mastodon-tl--get (concat "tag/" tag))))
+
(defun mastodon-tl--from-toot (key toot)
"Return value for KEY in TOOT."
(cdr (assoc key toot)))