GNU bug report logs -
#51176
eww switch buffer by title
Previous Next
Reported by: Yuchen Pei <hi <at> ypei.me>
Date: Wed, 13 Oct 2021 04:57:02 UTC
Severity: normal
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> >> I see. Then maybe in the existing hook `eww-after-render-hook'?
> >
> > Yup; I misread the code -- that looks like the correct place to put it.
> > But I can also see many people wanting this, so perhaps a user option to
> > rename the buffers this way would be nice.
>
> That is right. I am preparing together with another person a patch
> that auto-renames eww buffers after they are rendered. The idea is to use
> either the page title or, if that is not available, the page's URL.
>
> In terms of user options, there would be a toggle to enable the
> behaviour (off by default to not upset existing users) as well as a
> defcustom with ":type 'function", so users can specify exactly how the
> renaming scheme should work.
>
> I expect the code to be finalised within the coming days, in case you
> have not done the work already.
FWIW, Bookmark+ allows these kinds of automatic renaming:
(defcustom bmkp-eww-buffer-renaming nil
"Whether and how an EWW buffer is renamed.
Non-nil values affect EWW behavior even when bookmarks are not used.
* nil: Do not rename buffer - use `*eww*' (vanilla EWW behavior).
* `url': Rename buffer to web-page title plus last 20 chars of URL.
* `page': Rename buffer to web-page title (only)."
:type '(choice
(const :tag "Do not rename buffer (use name `*eww*')" nil)
(const :tag "Rename buffer to web-page title plus last 20 chars of URL" url)
;; Any symbol other than `page' and nil is treated the same as `page'.
(const :tag "Rename buffer to web-page title" page))
:group 'bookmark-plus)
The code (e.g. for the after-render hook function)
is in file `bookmark+-1.el'.
https://www.emacswiki.org/emacs/BookmarkPlus
This bug report was last modified 3 years and 309 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.