Browser style keyword search for Emacs based on browse-apropos-url
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING
README.md
keyword-search-extra.el
keyword-search-mad.el
keyword-search.el

README.md

Table of Contents

keyword-search.el

Browser style keyword search for Emacs based on browse-apropos-url.

See http://www.emacswiki.org/emacs/BrowseAproposURL

Installation

keyword-search is available on MELPA.

You can install keyword-search with the following command.

  • M-x package-install [RET] keyword-search [RET]

Basic Configuration

You can set default search engine with the following command.

  • M-x customize-variable [RET] keyword-search-default [RET]

You can append search engines with the following commands.

  • C-h v keyword-search-alist [RET]
  • M-x customize-variable [RET] keyword-search-alist [RET]

Please refer to the comment of keyword-search.el.

Usage

  1. M-x keyword-search [RET]
  2. Choose search engine. [TAB] will autocomplete it.
  3. Search query will be read from symbol at point, region or string in the minibuffer.

Modes

keyword-search-extra-mode

Mode for an alist of extra language services. There are so many languages that it will be late at load time if this mode is ON. It takes 90 seconds to load it on an old computer.

Toggle ON/OFF:

  • M-x keyword-search-extra-mode [RET]

keyword-search-mad-mode

Mode for additional websites where experts or manias only use.

Toggle ON/OFF:

  • M-x keyword-search-mad-mode [RET]

keyword-search-dessert-stomach-mode

User-customizable mode.

(require 'keyword-search-extra)

(defun keyword-search-my-fun ()
  "G7 of greenhouse gas emitters."
  (keyword-search-meta-alist
   (let (
	 (alist '(
		  ("greenhouse-gas-%s" . "http://%s.greenhouse-gas/%%s")
		  ))
	 (locale '(
		   "de"
		   "in"
		   "ja"
		   "kr"
		   "ru"
		   "us"
		   "zh-CN"
		   ))
	 (value)  ; make sure list starts empty
	 )
     (dolist (site-element alist value)
       (let (
	     (car-element (car site-element))
	     (cdr-element (cdr site-element))
	     )
	 (cond
	  ((string-equal car-element "greenhouse-gas-%s")
	   (dolist (l locale value)
	     (setq value (add-to-list 'value
				      (cons
				       (intern
					(format car-element l))
				       (format cdr-element l))
				      t))))))))))

(add-hook 'keyword-search-dessert-stomach-mode-hook 'keyword-search-my-fun nil)
(keyword-search-dessert-stomach-mode t)

If you want to turn ON/OFF this mode, please append functions to keyword-search-dessert-stomach-mode-toggle-hook:

(add-hook 'keyword-search-dessert-stomach-mode-toggle-hook
	  'keyword-search-my-fun)

Demo Video