combining with helm-google-suggest
Created by: Dickby
Just by changing the functions helm-google
and helm-google-suggest-action
a little, and setting helm-google-suggest-default-browser-function
to helm-google
, they work together.
code:
(setq helm-google-suggest-default-browser-function 'helm-google)
(defun helm-google-suggest-action (candidate)
"Default action to jump to a google suggested candidate."
(let ((arg
candidate))
(helm-aif helm-google-suggest-default-browser-function
(funcall it arg)
(helm-browse-url arg))))
(defun helm-google ( &optional arg)
"Preconfigured `helm' : Google search."
(interactive)
(let ((google-referer "https://github.com/steckerhalter/helm-google")
(region
(if (not arg)
(when (use-region-p)
(buffer-substring-no-properties
(region-beginning)
(region-end)))
arg))
(helm-input-idle-delay 0.3))
(helm :sources 'helm-source-google
:prompt "Google: "
:input region
:buffer "*helm google*"
:history 'helm-google-input-history)))
This is just a dirty hack, but (if you like it) i would be happy to see this functionality in your package. Thanks.