I've configured this engine:
(setq engine/browser-function #'browse-url-firefox)
(defengine duckduckgo
"https://duckduckgo.com/?q=%s"
:browser 'eww-browse-url
:keybinding "d")
I guess the expected behavior is to open the duckduckgo URL with EWW, and all other engines's URLs with Firefox, but is not what I'm experiencing (some engines are using EWW, some are using Chrome, some Firefox..) I then found that engine/execute-search uses browse-url; looking into this function I see
(function (or (browse-url-select-handler url)
browse-url-browser-function))
So the :browser feature in engine-mode will work until the browse-url-handlers is nil. Is this the expected behavior? If so, can we make more explicit in the documentation? Otherwise, this patch in the engine/execute/search fixes the issue.
(defun engine/execute-search (search-engine-url browser-function search-term)
"Display the results of the query."
(interactive)
(let ((browse-url-handlers nil) ;; <-- THIS IS THE FIX
(browse-url-browser-function browser-function))
(browse-url
(format-spec search-engine-url
(format-spec-make ?s (url-hexify-string search-term))))))
I've configured this engine:
I guess the expected behavior is to open the duckduckgo URL with EWW, and all other engines's URLs with Firefox, but is not what I'm experiencing (some engines are using EWW, some are using Chrome, some Firefox..) I then found that
engine/execute-searchusesbrowse-url; looking into this function I seeSo the
:browserfeature in engine-mode will work until thebrowse-url-handlersisnil. Is this the expected behavior? If so, can we make more explicit in the documentation? Otherwise, this patch in theengine/execute/searchfixes the issue.