Subject: bug#51176: eww switch buffer by title

From: Juri Linkov <[email-masked]>
Date: Wed, 13 Oct 2021 20:31:17 +0300

>>> I think in that case, perhaps it would make more sense to just rename
>>> the eww buffer to have the title in the buffer name?  Then the normal
>>> buffer switching commands would work automatically.
>>
>> In Info, forking commands (such as 'Info-follow-nearest-node FORK')
>> create a new buffer with the Info node name in its buffer name, e.g.
>> *info-TITLE*.  So instead of current *eww*<2>, eww could use the same
>> format *eww-TITLE*, or uniquify-like angle brackets *eww<TITLE>*.
>
> Yup, that's what I meant.  The wrinkle here is that we don't know the
> title until we've fetched the HTML, so the buffer has to be renamed
> after rendering.

I see.  Then maybe in the existing hook `eww-after-render-hook'?  This is
the standard way to customize buffer renaming, e.g. I have a lot of such
(add-hook 'occur-hook 'occur-rename-buffer) for customizing different modes.