Whenever I use browse-url function inside of w3m I would like to have a default URL displayed for me.

It happens that what I mostly do is google searches, so if I could have https://google.com/search?q= as default URL any time I use browse-url it would save me a lot of typing.

How can I achieve this?

1 Answer 1


This is an example of what I have in my init file, just customize it a little bit and you're ready to go

(defun duckduckgo (what)
  "Use ddg to search for WHAT."
  (interactive "sSearch: ")
  (browse-url-firefox (concat "https://duckduckgo.com/?t=lm&q="
                              (url-unhex-string what))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.