Function: eww-browse-url
eww-browse-url is an autoloaded and byte-compiled function defined in
eww.el.gz.
Signature
(eww-browse-url URL &optional NEW-WINDOW)
Documentation
Ask the EWW browser to load URL.
Interactively, if the variable browse-url-new-window-flag is non-nil,
loads the document in a new buffer tab on the window tab-line. A non-nil
prefix argument reverses the effect of browse-url-new-window-flag.
If tab-bar-mode(var)/tab-bar-mode(fun) is enabled, then whenever a document would
otherwise be loaded in a new buffer, it is loaded in a new tab
in the tab-bar on an existing frame. See more options in
eww-browse-url-new-window-is-tab.
Non-interactively, this uses the optional second argument NEW-WINDOW
instead of browse-url-new-window-flag.
Source Code
;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
;;;###autoload
(defun eww-browse-url (url &optional new-window)
"Ask the EWW browser to load URL.
Interactively, if the variable `browse-url-new-window-flag' is non-nil,
loads the document in a new buffer tab on the window tab-line. A non-nil
prefix argument reverses the effect of `browse-url-new-window-flag'.
If `tab-bar-mode' is enabled, then whenever a document would
otherwise be loaded in a new buffer, it is loaded in a new tab
in the tab-bar on an existing frame. See more options in
`eww-browse-url-new-window-is-tab'.
Non-interactively, this uses the optional second argument NEW-WINDOW
instead of `browse-url-new-window-flag'."
(when new-window
(when (or (eq eww-browse-url-new-window-is-tab t)
(and (eq eww-browse-url-new-window-is-tab 'tab-bar)
tab-bar-mode))
(let ((tab-bar-new-tab-choice t))
(tab-new)))
(pop-to-buffer-same-window
(generate-new-buffer
(format "*eww-%s*" (url-host (url-generic-parse-url
(eww--dwim-expand-url url))))))
(eww-mode))
(let ((url-allow-non-local-files t))
(eww url)))