diff options
| author | marty hiatt <martianhiatus@disroot.org> | 2024-10-27 16:15:29 +0100 | 
|---|---|---|
| committer | marty hiatt <martianhiatus@disroot.org> | 2024-10-27 19:26:30 +0100 | 
| commit | fb3c01eec51db79d5327ca8492c15477a1ed6963 (patch) | |
| tree | 1b952ed789d933c3b6896aa7e7b54520cdf4c5a4 /lisp | |
| parent | 6d46a197b338ae1e3cbc758fc7901350f084a381 (diff) | |
rough search widget
search - require widget
widget: restore search view heading
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mastodon-search.el | 11 | 
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 | 
