Function: browse-url-firefox

browse-url-firefox is an autoloaded, interactive and byte-compiled function defined in browse-url.el.gz.

Signature

(browse-url-firefox URL &optional NEW-WINDOW)

Documentation

Ask the Firefox WWW browser to load URL.

Defaults to the URL around or before point. Passes the strings in the variable browse-url-firefox-arguments to Firefox.

Interactively, if the variable browse-url-new-window-flag is non-nil, loads the document in a new Firefox window. A non-nil prefix argument reverses the effect of browse-url-new-window-flag.

If browse-url-firefox-new-window-is-tab is non-nil, then whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead.

Non-interactively, this uses the optional second argument NEW-WINDOW instead of browse-url-new-window-flag.

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
;;;###autoload
(defun browse-url-firefox (url &optional new-window)
  "Ask the Firefox WWW browser to load URL.
Defaults to the URL around or before point.  Passes the strings
in the variable `browse-url-firefox-arguments' to Firefox.

Interactively, if the variable `browse-url-new-window-flag' is non-nil,
loads the document in a new Firefox window.  A non-nil prefix argument
reverses the effect of `browse-url-new-window-flag'.

If `browse-url-firefox-new-window-is-tab' is non-nil, then
whenever a document would otherwise be loaded in a new window, it
is loaded in a new tab in an existing window instead.

Non-interactively, this uses the optional second argument NEW-WINDOW
instead of `browse-url-new-window-flag'."
  (interactive (browse-url-interactive-arg "URL: "))
  (setq url (browse-url-encode-url url))
  (let* ((process-environment (browse-url-process-environment)))
    (apply #'start-process
           (concat "firefox " url) nil
           browse-url-firefox-program
           (append
            browse-url-firefox-arguments
            (if (browse-url-maybe-new-window new-window)
		(if browse-url-firefox-new-window-is-tab
		    '("-new-tab")
		  '("-new-window")))
            (list url)))))