From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#51176: eww switch buffer by title Date: Wed, 13 Oct 2021 20:31:17 +0300 Organization: LINKOV.NET Message-ID: <875yu0x256.fsf@mail.linkov.net> References: <87v9214j6g.fsf@ypei.me> <87lf2x6t11.fsf@gnus.org> <87fst53ytg.fsf@ypei.me> <871r4p6q5n.fsf@gnus.org> <871r4oyjm1.fsf@mail.linkov.net> <875yu050sz.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18221"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 51176@debbugs.gnu.org, Yuchen Pei To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 13 19:34:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mai8u-0004XV-Qz for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 19:34:16 +0200 Original-Received: from localhost ([::1]:36100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mai8t-0002gE-7s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Oct 2021 13:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mai8h-0002ft-80 for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 13:34:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mai8h-0000WY-0A for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 13:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mai8g-0001hw-UL for bug-gnu-emacs@gnu.org; Wed, 13 Oct 2021 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Oct 2021 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51176 X-GNU-PR-Package: emacs Original-Received: via spool by 51176-submit@debbugs.gnu.org id=B51176.16341464006435 (code B ref 51176); Wed, 13 Oct 2021 17:34:02 +0000 Original-Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 17:33:20 +0000 Original-Received: from localhost ([127.0.0.1]:33306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mai80-0001fj-Ku for submit@debbugs.gnu.org; Wed, 13 Oct 2021 13:33:20 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mai7y-0001f7-FP for 51176@debbugs.gnu.org; Wed, 13 Oct 2021 13:33:19 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id E9AAE1C0002; Wed, 13 Oct 2021 17:33:10 +0000 (UTC) In-Reply-To: <875yu050sz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Oct 2021 18:47:40 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217152 Archived-At: >>> 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*. > > 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.