Skip to content

DCPRevere/bang.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

æ/bang.el

Read the blog post: https://blog.almost.education/posts/bang-el

bang.el allows one to DuckDuckGo’s !Bang from the comfort of Emacs.

It adds special support for Org-roam, with the function bang-roam allowing one to search with the roam node’s title, and bang-roam-wiki, which does the same specifically for Wikipedia.

Installation

bang.el requires that org-roam also be installed. We are working to make this an optional requirement.

Doom Emacs

In packages.el:

(package! bang :recipe (:host github :repo "EducatedAlmost/bang.el"))

In config.el:

(require 'bang)

;; or, with roam support
(setq bang-roam-support t)
(after! org
  (require 'bang))

Usage

All functions can also be called interactively.

;; Can be called from anywhere:
(bang "w" "Gnosis")
(bang-info)
(bang-find-prefix "")

;; Must be called from inside an Org-roam node:
(bang-roam "ma")
(bang-roam-wiki)

Called without a TERM argument, most Bangs will take one to the website’s homepage.

Example prefixes

!gh
GitHub repositories
!clj
ClojureDocs
!xiny
Learn X in Y minutes, a introduction to any programming language
!pm
PubMed, biomedical papers
!arx
arXiv, physics papers
!wa
WolframAlpha, computational knowledge engine
!ma
MemoryAlpha, the Star Trek Wiki
!awoiaf
A Wiki of Ice and Fire

For a list of prefixes, see here, or call bang-find-prefix or bang-info.

To suggest a new Bang or correct an existing one: https://duckduckgo.com/newbang

Changing which browser is used

Internally, the functions all call browse-url. To choose which program is used, one can edit the values of browse-url-browser-function and browse-url-generic-function as documented here.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published