~Because everybody needs their own web-search Emacs function~
Move to sr.ht
give up on trying to support evil without pulling it in as dependency
try to move evil support into a with-eval-after-load form

refs

master
browse log

clone

read-only
https://git.sr.ht/~kisaragi_hiu/yasearch
read/write
git@git.sr.ht:~kisaragi_hiu/yasearch

You can also use your local clone with git send-email.

yasearch

License: GPL v3+

~Because everybody needs their own web-search Emacs function~

Search the word under point or region on the web.

Install

straight.el

(straight-use-package '(yasearch :type git :repo "https://git.sr.ht/~kisaragi_hiu/yasearch"))

Manually

Put yasearch.el under your load-path, then (require 'yasearch) in your init file.

Use

  • yasearch engine query: lookup query with engine. Interactively, ask to select engine from yasearch-engine-alist; query is taken from

    • the active region, if there is one,
    • the word at point, or
    • a prompt, in this order; a prompt will always be used if a prefix argument is given.
  • yasearch-evil: an evil motion to search word objects with yasearch. This needs to be required seperately: (require 'yasearch-evil) Bind this to your preferred keys in normal state, say gs. Now gsiW asks you which search engine to use, then searches the WORD at point (iW) with it.

Customize

yasearch-engine-alist: An alist mapping search engines with their query URLs.

Each item is a cons cell mapping the engine's name as a symbol and the query URL. Example:

'((google . "https://google.com/search?q=%s")
  (duckduckgo . "https://duckduckgo.com/?q=%s"))

Other packages