I quite like
helm-google-suggest, but I would like it even more if it didn't connect to Google. Once you have your candidate, searching for it in a better search engine is as simple as this:
(setq helm-google-suggest-search-url "https://duckduckgo.com/lite/?q=%s&kp=1")
However, generating the suggestions themselves is not so easy. The DuckDuckGo API documentation is sparse, to say the least. The only thing I could find is
which generates the suggestions, but does not accept the
format=xml query that the other DuckDuckGo APIs accept. Instead, it always returns a JSON string.
helm-google-suggest expects its URL to return XML. This doesn't work:
(setq helm-google-suggest-url "https://duckduckgo.com/ac/?q=%s")
An obvious solution would be to hack my own function that regex-replaces the JSON string to valid XML and hands it back to Helm, but before I do that, is there an easier way?