2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Search Engine layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
#+TAGS: layer|web service
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
[[file:img/searchengine.jpg]]
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2017-09-03 18:42:17 +00:00
|
|
|
- [[#features][Features:]]
|
2019-04-21 20:04:25 +00:00
|
|
|
- [[#supported-search-engines][Supported search engines]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
2018-12-05 03:03:03 +00:00
|
|
|
- [[#key-bindings][Key bindings]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#customize-it][Customize it!]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Description
|
2017-04-25 15:42:58 +00:00
|
|
|
This layer adds support for the [[https://github.com/hrs/engine-mode][Search Engine]] package.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2017-09-03 18:42:17 +00:00
|
|
|
** Features:
|
2018-09-19 03:54:47 +00:00
|
|
|
- Browser search integration
|
2017-09-03 18:42:17 +00:00
|
|
|
|
2019-04-21 19:00:24 +00:00
|
|
|
* Supported search engines
|
2015-06-10 16:44:30 +00:00
|
|
|
- Amazon
|
2018-08-15 18:09:48 +00:00
|
|
|
- Bing
|
2015-06-10 16:44:30 +00:00
|
|
|
- Duck Duck Go
|
2018-08-15 18:09:48 +00:00
|
|
|
- Ecosia
|
2015-06-10 16:44:30 +00:00
|
|
|
- Google
|
|
|
|
- Google Images
|
|
|
|
- GitHub
|
|
|
|
- Google Maps
|
|
|
|
- Twitter
|
2018-08-15 18:09:48 +00:00
|
|
|
- Project Gutenberg
|
|
|
|
- YouTube
|
2015-06-10 16:44:30 +00:00
|
|
|
- Stack Overflow
|
|
|
|
- Spacemacs Issues
|
2018-08-15 18:09:48 +00:00
|
|
|
- Spacemacs Pull Requests
|
2015-06-10 16:44:30 +00:00
|
|
|
- Wikipedia
|
|
|
|
- Wolfram Alpha
|
|
|
|
|
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =search-engine= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2016-04-13 03:31:38 +00:00
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
* Key bindings
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2015-06-12 01:23:07 +00:00
|
|
|
| Evil | Holy | Command |
|
|
|
|
|-----------+---------+-------------------------------------------|
|
2015-06-10 16:44:30 +00:00
|
|
|
| ~SPC a /~ | ~C-c /~ | Summon a Helm buffer to select any engine |
|
|
|
|
|
|
|
|
* Customize it!
|
2019-05-26 20:58:52 +00:00
|
|
|
If you'd rather have emacs use chrome, or firefox or any other thing (=eww=) you
|
2015-06-10 16:44:30 +00:00
|
|
|
can have that customization. For example for google chrome you can put this in
|
2015-09-28 06:05:18 +00:00
|
|
|
your =dotspacemacs/user-config=:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq browse-url-browser-function 'browse-url-generic
|
|
|
|
engine/browser-function 'browse-url-generic
|
|
|
|
browse-url-generic-program "google-chrome")
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-09-28 06:05:18 +00:00
|
|
|
Also if you want more search engines, just push them (do this in
|
|
|
|
=dotspacemacs/user-config=)
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2018-09-19 03:54:47 +00:00
|
|
|
(push '(custom1
|
|
|
|
:name "Custom Search Engine 1"
|
|
|
|
:url "http://www.domain.com/s/stuff_sutff_remember_to_replace_search_candidate_with_%s")
|
|
|
|
search-engine-alist)
|
2015-06-10 16:44:30 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
2019-05-26 20:58:52 +00:00
|
|
|
If you'd rather not use helm but would want a specific search engine, remember
|
2015-06-10 16:44:30 +00:00
|
|
|
the function generated is always =engine/search-(the name of the search engine
|
|
|
|
lower-case and hyphen instead-of-spaces-for-separation)= so you can bind that to
|
2015-06-10 21:16:01 +00:00
|
|
|
any key binding you want.
|