Created
January 9, 2013 13:24
-
-
Save ping13/4493087 to your computer and use it in GitHub Desktop.
Call `howdoi` from Emacs, see https://github.com/gleitz/howdoi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; call howdoi, https://github.com/gleitz/howdoi | |
(defvar howdoi-history nil "History for howdoi lookups, see `howdoi'") | |
(defun howdoi () | |
"Interactive function for howdoi queries. It takes the current | |
word and invokes a minibuffer where the user can accept or change | |
the query." | |
(interactive) | |
(shell-command | |
(concat "howdoi " | |
(read-from-minibuffer "howdoi: " | |
(current-word) nil nil 'howdoi-history)) | |
"*Howdoi Query*" | |
) | |
(set-buffer "*Howdoi Query*") | |
(help-mode)) | |
(global-set-key "\C-x\C-h" 'howdoi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Came across sublime-howdoi-direct-paste today. Made me wonder if there was something similar in emacs. And here it is! Love you Emacs! ❤️