[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buff
From: |
Juri Linkov |
Subject: |
bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buffer-background' |
Date: |
Sun, 20 Aug 2023 19:44:03 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> +(defun eww-open-in-new-buffer (&optional no-select url)
> + "Fetch URL in 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."
> + (interactive "P")
> + (if-let ((url (or url (eww-suggested-uris))))
> + (if (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)
> + (eww--open-url-in-new-buffer url)
> + (when no-select
> + (tab-bar-switch-to-prev-tab)))
tab-bar-switch-to-prev-tab is a wrong function, please use
tab-bar-switch-to-recent-tab instead.
Also please add a new command to open a tab in background.
Then new command could be bound to the standard RET modifier
used in all web browsers to open a tab in background.
bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buffer-background', Michael Heerdegen, 2023/08/17