Skip to content

Instantly share code, notes, and snippets.

@ping13
Created January 9, 2013 13:24
Show Gist options
  • Save ping13/4493087 to your computer and use it in GitHub Desktop.
Save ping13/4493087 to your computer and use it in GitHub Desktop.
Call `howdoi` from Emacs, see https://github.com/gleitz/howdoi
;; 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)
@tejasbubane
Copy link

Came across sublime-howdoi-direct-paste today. Made me wonder if there was something similar in emacs. And here it is! Love you Emacs! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment