[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: |
Eli Zaretskii |
Subject: |
bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buffer-background' |
Date: |
Sun, 27 Aug 2023 19:40:16 +0300 |
> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>, 65346@debbugs.gnu.org
> Date: Sun, 20 Aug 2023 19:44:03 +0300
>
> > +(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.
Thanks, done.
> 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.
I didn't do that; patches welcome.
bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buffer-background', Michael Heerdegen, 2023/08/17