Skip to content

Instantly share code, notes, and snippets.

@leighklotz
Created March 5, 2016 00:32
Show Gist options
  • Select an option

  • Save leighklotz/cb5ad4cb0bde0755aaec to your computer and use it in GitHub Desktop.

Select an option

Save leighklotz/cb5ad4cb0bde0755aaec to your computer and use it in GitHub Desktop.
M-X how-do-i -- insert sample code based on StackOverflow search
;;;-*-EMACS-LISP-*-
;;; pip install howdoi
(defun how-do-i (task count)
(interactive "sTask: \np")
(let ((language (replace-regexp-in-string "-mode" "" (symbol-name major-mode))))
(shell-command (format "howdoi -n %d %s %s" count language task) t)))
(provide 'how-do-i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment