diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-03 12:58:09 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-03 12:58:09 +0200 |
commit | b2ae61663cca5a66e43112cccb9619c49d46df44 (patch) | |
tree | b730d5cdf5b209651ead58502289984725c86369 /lisp/mastodon.el | |
parent | 26ec5d7076e47bc7240e3e36aa516909f8c0424c (diff) |
url-lookup: read-string if no arg or url at point
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r-- | lisp/mastodon.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el index a85a7f7..3162e91 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -269,12 +269,15 @@ If REPLY-JSON is the json of the toot being replied to." ;;;###autoload (defun mastodon-url-lookup (&optional query-url) - "Do a WebFinger lookup for QUERY-URL, or the URL at point. + "Do a WebFinger lookup for a URL. +URL can be arg QUERY-URL, or URL at point, or provided by the user. If a status or account is found, load it in `mastodon.el', if not, just browse the URL in the normal fashion." (interactive) (message "Performing lookup...") - (let* ((query (or query-url (url-get-url-at-point))) + (let* ((query (or query-url + (url-get-url-at-point) + (read-string "Lookup URL: "))) (url (format "%s/api/v2/search" mastodon-instance-url)) (param (concat "resolve=t")) ; webfinger (response (mastodon-http--get-search-json url query param :silent))) |