2

In the emacs' .emacs:

'(browse-url-browser-function (quote browse-url-default-browser))

I have restarted the system after setting Opera as default browser. When I run:

update-alternatives --config gnome-www-browser

There are 4 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser).

  Selection    Path                           Priority   Status
------------------------------------------------------------
  0            /usr/bin/google-chrome-stable   200       auto mode
  1            /usr/bin/firefox-esr            70        manual mode
  2            /usr/bin/google-chrome-stable   200       manual mode
  3            /usr/bin/iceweasel              70        manual mode
* 4            /usr/bin/opera                  120       manual mode

Press <enter> to keep the current choice[*], or type selection number:     

and

update-alternatives --config x-www-browser

    There are 6 choices for the alternative x-www-browser (providing/usr/bin/x-www-browser).

  Selection    Path                           Priority   Status
------------------------------------------------------------
  0            /usr/bin/google-chrome-stable   200       auto mode

  1            /usr/bin/firefox-esr            70        manual mode
  2            /usr/bin/google-chrome-stable   200       manual mode
  3            /usr/bin/iceweasel              70        manual mode
  4            /usr/bin/konqueror              30        manual mode
* 5            /usr/bin/opera                  120       manual mode
  6            /usr/bin/qupzilla               80        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

When I click on a .html file directly, it's opened using Opera.

cat ~/.local/share/applications/defaults.list

[Default Applications]
application/pdf=FoxitReader.desktop
application/ppdf=FoxitReader.desktop

However, emacs insists on opening files with firefox. Where is it taking this setting from?

2

Please try:

(setq browse-url-browser-function 'browse-url-generic
          browse-url-generic-program "opera")

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.