This package is inspired by howdoi python and howdoi Emacs packages. it searches your query all across stackoverflow and it’s sisters’ sites. They are:
- stackoverflow.com
- stackexchange.com
- superuser.com
- serverfault.com
- askubuntu.com
The result is then showed in an org-mode
buffer. For each result, question and
three answers were showed, but they are collapsed by default except the first
answer. As this package uses Google to get the links, for each query there will
be a dozen of links, the fist link will be used, then users can go to next
link and previous link. The author believes that when searching for solutions it
is important for users to read both questions and answers, so no “quick look”
features such as code only view or code completion are provided.
MELPA
Spacemacs layer:
https://github.com/thanhvg/spacemacs-eos
promise
and request
are required.
User must have org-mode
9.2 or later installed also.
howdoyou-query:
prompt for query and do searchhowdoyou-next-link:
go to next linkhowdoyou-previous-link:
go to previous linkhowdoyou-go-back-to-first-link:
go back to first linkhowdoyou-reload-link:
reload link
howdoyou-use-curl:
default is true ifcurl
is availablehowdoyou-number-of-answers:
maximal number of answers to show, default is 3howdoyou-switch-to-answer-buffer
: switch to answer buffer if non nil, default is nil
add this snippet to you config file
(with-eval-after-load "helm-net"
(push (cons "How Do You" (lambda (candidate) (howdoyou-query candidate)))
helm-google-suggest-actions))
Now helm-google-suggest
will pass suggestion to howdoyou-query as default
action.
Note that spacemas-eos
has its own faster google suggetion engine provided by
google-suggest package.
Requires installed and configured 3rd party package counsel-web.
add this function definition to your config file
(defun my/howdoyou-with-suggestions ()
"Call `howdoyou-query' with suggestions from `counsel-web-suggest'."
(interactive)
(counsel-web-suggest nil
"How Do You: "
#'counsel-web-suggest--google
(lambda (x)
(howdoyou-query x))))
Now when calling my/howdoyou-with-suggestion
(either from M-x
or by key binding of your choice)
it will pass counsel-web-suggest
suggestions to howdoyou-query.
cd test
bash curl.sh
new google html files are created to run test aganst them.
at project root
cask exec ert-runner
dvzubarev, leothelocust, dickmao, Alois Janíček, Evan, Boruch Baum