aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-search.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index 25db7d8..501344b 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -29,6 +29,7 @@
;;; Code:
(require 'json)
(require 'mastodon-tl)
+(require 'mastodon-widget)
(autoload 'mastodon-auth--access-token "mastodon-auth")
(autoload 'mastodon-http--api "mastodon-http")
@@ -211,7 +212,15 @@ is used for pagination."
(items (alist-get (intern type) response)))
(with-mastodon-buffer buffer #'mastodon-mode nil
(mastodon-search-mode)
- (mastodon-search--insert-heading type)
+ (mastodon-search--insert-heading "search")
+ (mastodon-widget--create
+ "Results"
+ '(accounts hashtags statuses)
+ (intern type)
+ (lambda (widget &rest _ignore)
+ (let ((value (widget-value widget)))
+ (mastodon-search--query query (symbol-name value)))))
+ (insert "\n\n")
(cond ((string= type "accounts")
(mastodon-search--render-response items type buffer params
'mastodon-views--insert-users-propertized-note