Skip to content

rtrppl/metasearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metasearch.el

Metasearch in action

Metasearch.el allows to simultaneously use the same search string in multiple search engines (see also Metasearch engine - Wikipedia). I define search engine in this context as a website that executes a search when passed the correct URL. Depending on your browser configuration, for each of these websites either a new tab or a new window is opened (using open and an URL). Search engines can be organized and called in sets.

Change log

0.1.2

  • Fix for Linux, which uses xdg-open

0.1.1

  • Includes a small fix for “Trailing garbage following expression” bug

0.1

  • first public version

Installation

Clone the repository:

git clone https://github.com/rtrppl/metasearch

To run Metasearch, you need to load the package by adding it to your .emacs or init.el:

(load "/path/to/metasearch/metasearch.el") 

You should set a binding to metasearch-search-set. All my search and dictionary bindings start with “C-c d”, hence my choice below.

(global-set-key (kbd "C-c d m") 'metasearch-search-set)

If you want to add a binding to a specific search set, you could use this template:

(defun metasearch-search ()
  (interactive)
  (metasearch-search-set "Locations"))
(global-set-key (kbd "C-c d M") 'metasearch-search)

Or, if you use straight:

(use-package metasearch
  :straight (:host github :repo "rtrppl/metasearch")
  :bind
  (:map global-map)
  ("C-c d m" . metasearch-search-set))

Functions

These are the primary functions of Metasearch.el:

metasearch-add-search-engine and metasearch-remove-search-engine will, as their name implies, add and remove search engines from a list stored in ~/.metasearch-search-engine-list, a local JSON file.

The same file is used to store information about search sets. A set is a user-created group of different search engines. For example, I have a set called “Locations” that includes “Accuweather, Apple Maps Beta, Bing Maps, Google Maps, OSM, Pinboard, Reddit, Tiktok, Tiktok via Google, Wikipedia EN, Youtube”, which gives me a pretty good understanding of a location. Modify or create search sets with metasearch-modify-set (see the screenshot below). When a set is empty, it is removed.

Modifing the search set "Locations"

metasearch-search-set will allow you to pick a set for any search. metasearch-search-all will use all available search engines for a search. If a region is active, it will be used as the search query, otherwise a search query is needed.

Common search URLs

As you need to manually add search engines to Metasearch, here are the URLs for some common search engines to get you started:

Search Engines

Locations

Coding

Social

Shopping

News

Other

About

Metasearch for Emacs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published