public
Last active

Hand off slime doc search to a website, bound to C-c C-d C-s, defaults to quickdocs.org.

  • Download Gist
slime-documentation-search.el
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
;;; -*- lexical-binding: t -*-
 
(define-slime-contrib slime-documentation-search
"Hand off a documenation search to a web site."
(:authors "Ben Hyde <bhyde@pobox.com>")
(:license "GPL")
(:on-load
(define-key slime-doc-map "\C-s" 'slime-documention-search)
(define-key slime-doc-map "s" 'slime-documention-search)))
 
(defvar slime-documentation-search-site-format
"http://quickdocs.org/search?q=%s"
"Format string to create url to hand off to.")
 
;; Some alternatives...
; (setf slime-documentation-search-site-format "http://l1sp.org/search?q=%s")
; (setf slime-documentation-search-site-format "http://quickdocs.org/search?q=%s")
; (setf slime-documentation-search-site-format "http://lispdoc.com/?q=%s&search=Full+text+search")
; (setf slime-documentation-search-site-format "http://lisp-search.acceleration.net/search?q=%s")
 
(require 'browse-url)
 
(defun slime-documention-search (name)
"Hand off search request to a web site."
(interactive (list (slime-read-symbol-name "search for: ")))
(browse-url (format slime-documentation-search-site-format
(browse-url-encode-url name))))
 
(provide 'slime-documentation-search)

I wrote a refactoring of this for my own personal use:

https://gist.github.com/aarvid/6250845

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.