Skip to content

Instantly share code, notes, and snippets.

@rtrppl
Created December 15, 2023 07:40
Show Gist options
  • Save rtrppl/06b01bd4521afe2c26c3c8e563ca81db to your computer and use it in GitHub Desktop.
Save rtrppl/06b01bd4521afe2c26c3c8e563ca81db to your computer and use it in GitHub Desktop.
kagi this
(defun lt/kagi ()
"Kagi the selected region if any, display a query prompt otherwise."
(interactive)
(browse-url
(concat
"https://kagi.com/search?q="
(url-hexify-string (if mark-active
(buffer-substring (region-beginning) (region-end))
(read-string "Kagi: "))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment