3

I'm working under org-mode.

When I click on a [http://example.com] link, it opens a tab in Firefox as expected. The .emacs config is: '(browse-url-browser-function (quote browse-url-firefox))

However, for links in the form file:///localdir/myfile.html it depicts the message running /usr/bin/sensible-browser and starts Opera.

Why would emacs do that? Why does it not use Firefox or defaults to my system default browser?

3

Well, in a sense sensible-browser is a system default browser:-)

I believe that you need to use the update-alternatives system to set that system default.

As to why Org mode is using sensible-browser instead of the browse-URL functionality, I suspect it's because for file URLs it tries to be clever.

1

There are lots of good reasons why it might not be useful to open a given file: URL in a web browser, so org has a distinct mechanism for handling them and deciding what to do with them.

M-x customize-option RET org-file-apps RET

But in practice, Bob Uhl's answer is probably what you want? If Firefox is your preferred browser, then you should probably have it set as your system default, rather than customizing multiple independent Emacs settings to override the system default in the same way. (Caveat: I don't know how sensible-browser makes its decision, so the situation might not be as simplistic as I've assumed.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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