diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-02-11 10:23:36 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-02-11 10:23:36 +0100 |
commit | 597ff937450bf20ca2afcd0b4ffc7879852ff886 (patch) | |
tree | 54a4c2d64a16fd2877054d5af7b4091019e4494b /helm-net.el | |
parent | 3d8ce2420822e954f2a8112e25ba4f2dba1d5647 (diff) |
Use a format string for url's in web search (#866).
* helm-net.el (helm-google-suggest-search-url,
helm-yahoo-suggest-search-url,
helm-yahoo-suggest-action,
helm-google-suggest-action): Do it.
Diffstat (limited to 'helm-net.el')
-rw-r--r-- | helm-net.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helm-net.el b/helm-net.el index 4e9d3dcd..52672155 100644 --- a/helm-net.el +++ b/helm-net.el @@ -53,7 +53,7 @@ When nil, fallback to `browse-url-browser-function'." :group 'helm-net) (defcustom helm-google-suggest-search-url - "http://www.google.com/search?ie=utf-8&oe=utf-8&q=" + "http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" "URL used for Google searching." :type 'string :group 'helm-net) @@ -71,7 +71,7 @@ Otherwise `url-retrieve-synchronously' is used." :group 'helm-net) (defcustom helm-yahoo-suggest-search-url - "http://search.yahoo.com/search?&ei=UTF-8&fr&h=c&p=" + "http://search.yahoo.com/search?&ei=UTF-8&fr&h=c&p=%s" "Url used for Yahoo searching." :type 'string :group 'helm-net) @@ -271,7 +271,7 @@ Return an alist with elements like (data . number_results)." (defun helm-google-suggest-action (candidate) "Default action to jump to a google suggested candidate." - (let ((arg (concat helm-google-suggest-search-url + (let ((arg (format helm-google-suggest-search-url (url-hexify-string candidate)))) (helm-aif helm-google-suggest-default-browser-function (funcall it arg) @@ -325,7 +325,7 @@ Return an alist with elements like (data . number_results)." (defun helm-yahoo-suggest-action (candidate) "Default action to jump to a Yahoo suggested candidate." - (helm-browse-url (concat helm-yahoo-suggest-search-url + (helm-browse-url (format helm-yahoo-suggest-search-url (url-hexify-string candidate)))) (defvar helm-source-yahoo-suggest |