1

Up until yesterday, clicking a link in emacs would open the corresponding page in my browser (Firefox). Sometime yesterday this changed to always open a new window in the browser, on the home page. Any idea what changed - and how to fix it?

GNU Emacs: 24.4.1 Firefox: 36.0 Ubuntu: 14.04

Appears related to reported Ubuntu Firefox bug here.

2
  • See also emacs.stackexchange.com/q/9636/2064
    – artscan
    Mar 10, 2015 at 3:52
  • Opening the link in EWW works for me. Then typing & inside EWW opens the link in Firefox. It is interesting that this works and (setq browse-url-generic-program "firefox") apparently does not. Apr 2, 2018 at 1:14

2 Answers 2

1

Summary: Firefox version 36 has removed the -remote option (see here). The emacs-lisp function browse-url-firefox uses this option on non-Windows systems. Changing the function to never use remote option solves the problem.

What specifically you can do: browse-url-firefox is defined in the emacs-lisp associated with your version of emacs - for me: /usr/local/share/emacs/24.4/lisp/net/browse-url.el. You can either edit browse-url.el, or redefine the function browse-url-firefox elsewhere. The specific change in the function browse-url-firefox is to change:

(use-remote
      (not (memq system-type '(windows-nt ms-dos))))

to:

(use-remote nil)
0

Add the following bits to your ~/.emacs file to fix this issue:

;; work around the bogus "-remote" flag specified by browse-url-firefox
(setq browse-url-browser-function 'browse-url-generic)
(setq browse-url-generic-program "firefox")

The "generic" browser doesn't try to be smart about "-remote"; it just calls whatever program is configured. Incidentally, Firefox does the right thing when called like that anyway, so the whole "-remote" business is pointless anyway.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .