@findex eww-open-in-new-buffer
@kindex M-RET
- The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens the
-URL at point in a new EWW buffer, akin to opening a link in a new
-``tab'' in other browsers. When @code{global-tab-line-mode} is
-enabled, this buffer is displayed in the tab on the window tab line.
-When @code{tab-bar-mode} is enabled, a new tab is created on the frame
-tab bar. If the prefix key @kbd{C-u} is avaliable, it will stay on
-current buffer.
+ The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens
+the URL at point in a new EWW buffer, akin to opening a link in a new
+``tab'' in other browsers. If invoked with prefix argument, the
+command will not make the new buffer the current one. When
+@code{global-tab-line-mode} is enabled, this buffer is displayed in
+the tab on the window tab line. When @code{tab-bar-mode} is enabled,
+a new tab is created on the frame tab bar.
@findex eww-readable
@kindex R
translated versions or associated RSS feeds.
+++
-*** 'eww-open-in-new-buffer' support prefix key "C-u" to stay current buffer.
-The command accept the prefix key "C-u" to open the url in a new
-buffer but stay in current buffer, won't jump to the new buffer.
+*** 'eww-open-in-new-buffer' supports the prefix argument.
+When invoked with the prefix argument ('C-u'),
+'eww-open-in-new-buffer' will not make the new buffer the current one.
+This is useful for continuing reading the URL in the current buffer
+when the new URL is fetched.
** go-ts-mode
(defun eww--open-url-in-new-buffer (url)
"Open the URL in a new EWW buffer."
- ;; clone useful to keep history, but
- ;; should not clone from non-eww buffer
+ ;; Clone is useful to keep history, but we
+ ;; should not clone from a non-eww buffer.
(with-current-buffer
(if (eq major-mode 'eww-mode) (clone-buffer)
(generate-new-buffer "*eww*"))
(eww (if (consp url) (car url) url)))))
(defun eww-open-in-new-buffer (&optional no-select url)
- "Fetch URL in a new EWW buffer.
+ "Fetch URL (interactively, the link at point) into a new EWW buffer.
-If the NO-SELECT is not `nil', the forcus will stay on current buffer.
-
-If the URL is `nil', it will try `eww-suggested-uris' under current cursor."
+NO-SELECT non-nil means do not make the new buffer the current buffer."
(interactive "P")
(if-let ((url (or url (eww-suggested-uris))))
(if (or (eq eww-browse-url-new-window-is-tab t)