GNU bug report logs - #51176
eww switch buffer by title

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yuchen Pei <hi@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 29.1, send any further explanations to 51176 <at> debbugs.gnu.org and Yuchen Pei <hi@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 15 Oct 2021 12:13:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 08:13:35 2021
Received: from localhost ([127.0.0.1]:38382 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbM5f-00048v-Ne
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 08:13:35 -0400
Received: from quimby.gnus.org ([95.216.78.240]:48100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mbM5c-00048a-7D
 for 51176 <at> debbugs.gnu.org; Fri, 15 Oct 2021 08:13:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=jfo+drrZPUrJTv9TyEgLIwbik9zNQKjIJEzW4KWonFk=; b=ZNbx/RwqoxmXlnDSWad6S1s+1q
 3LW/aXI2zksHadGDCEVuR6xJvb6IhqVNTvYfb3PmVTWp58qXxaton/MJqvQPmp948RQ6KRYfG0/QX
 ziBQeighFVmRAUaMQH79xXwBdudBtBQPBHavDydsFKoTGcBfodRYr65VU/Y8oCaEz2hQ=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mbM5Q-0004Qm-SX; Fri, 15 Oct 2021 14:13:24 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN> <87r1co1x8f.fsf@HIDDEN>
 <87bl3qiysk.fsf@HIDDEN> <87sfx24lua.fsf@HIDDEN>
 <87ee8my1l8.fsf@HIDDEN>
X-Now-Playing: Kasai Allstars's _The Wire Tapper 56_: "The Large Bird, The
 Woman and The Baby"
Date: Fri, 15 Oct 2021 14:13:20 +0200
In-Reply-To: <87ee8my1l8.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Fri, 15 Oct 2021 14:22:27 +0300")
Message-ID: <87a6ja4hb3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Protesilaos Stavrou <info@HIDDEN> writes: > Because
 it may be useful for your consideration, there also exists the > more complex
 approach that I alluded to earlier ("complex" may be an > exaggeration, but
 still). Attached as well and also ba [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Abhiseck Paira <abhiseckpaira@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Protesilaos Stavrou <info@HIDDEN> writes:

> Because it may be useful for your consideration, there also exists the
> more complex approach that I alluded to earlier ("complex" may be an
> exaggeration, but still).  Attached as well and also based on your
> feedback.
>
>     0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch

Thanks; I thought the "complex" one was simpler, so I pushed that to
Emacs 29 (with some trivial changes and a manual entry).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 15 Oct 2021 11:22:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 07:22:40 2021
Received: from localhost ([127.0.0.1]:38318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbLIN-0000LN-ID
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 07:22:40 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:59425)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1mbLIK-0000L1-Gi
 for 51176 <at> debbugs.gnu.org; Fri, 15 Oct 2021 07:22:38 -0400
Received: (Authenticated sender: public@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 842FA1C0004;
 Fri, 15 Oct 2021 11:22:28 +0000 (UTC)
From: Protesilaos Stavrou <info@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-Reply-To: <87sfx24lua.fsf@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN> <87r1co1x8f.fsf@HIDDEN>
 <87bl3qiysk.fsf@HIDDEN> <87sfx24lua.fsf@HIDDEN>
User-Agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Fri, 15 Oct 2021 14:22:27 +0300
Message-ID: <87ee8my1l8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On 2021-10-15, 12:35 +0200,
 Lars Ingebrigtsen <larsi@HIDDEN>
 wrote: > Protesilaos Stavrou <info@HIDDEN> writes: > >> Please find
 attached the patch which implements a renaming scheme for >> EWW buffers.
 I include Abhiseck, the co-author of this patch, in Cc. [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [217.70.183.197 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [217.70.183.197 listed in wl.mailspike.net]
 0.0 SPF_NONE               SPF: sender does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: kamnitnik.top (top)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Abhiseck Paira <abhiseckpaira@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

--=-=-=
Content-Type: text/plain

On 2021-10-15, 12:35 +0200, Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> Protesilaos Stavrou <info@HIDDEN> writes:
>
>> Please find attached the patch which implements a renaming scheme for
>> EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.
>>
>> What do you think?
>>
>> We had entertained the notion of a single defcustom with more options,
>> but ultimately decided against it on the grounds that it was more
>> complex.
>
> Yeah, looks good to me, but:
>
> miha@HIDDEN writes:
>
>> With your patch, the buffer isn't renamed if the user presses "l" or "r"
>> to go backward and forward in history. I suggest calling your rename
>> function from 'eww-update-header-line-format' instead.
>
> Yes, it has to be performed upon all updates.  But putting it in that
> function would be misleading, so what about creating a new function
> `eww--after-page-change' that would call 'eww-update-header-line-format'
> and
>
>             (when eww-auto-rename-buffer-flag
>               (funcall eww-auto-rename-buffer-function))
>
> and call that where 'eww-update-header-line-format' is called now.
>
> And we don't really call user options -flag, so rename it to just
> `eww-auto-rename-buffer'. 

Thanks for the feedback!  Please find attached the revised patch, based
on what you suggested:

    0001-Implement-auto-renaming-scheme-for-EWW-buffers-simple.patch

Because it may be useful for your consideration, there also exists the
more complex approach that I alluded to earlier ("complex" may be an
exaggeration, but still).  Attached as well and also based on your
feedback.

    0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch

-- 
Protesilaos Stavrou
https://protesilaos.com

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch

From 9b1c46c18c113952f2274fab9c334140d5c071e3 Mon Sep 17 00:00:00 2001
Message-Id: <9b1c46c18c113952f2274fab9c334140d5c071e3.1634295931.git.info@HIDDEN>
From: Protesilaos Stavrou <info@HIDDEN>
Date: Fri, 15 Oct 2021 14:05:01 +0300
Subject: [PATCH] Implement auto-renaming scheme for EWW buffers

* etc/NEWS: Document the new user options.

* lisp/net/eww.el (eww-auto-rename-buffer, eww-buffer-name-length):
Add new user options.
(eww--rename-buffer): Introduce new function that performs the
renaming of buffers.
(eww--after-page-change): Add new wrapper function which calls
'eww-update-header-line-format' and 'eww--rename-buffer'.
(eww, eww-render, eww-tag-title, eww-readable, eww-restore-history):
Include eww--after-page-change.

Fix bug#51176.

Co-authored-by: Abhiseck Paira <abhiseckpaira@HIDDEN>
Co-authored-by: Protesilaos Stavrou <info@HIDDEN>
---
 etc/NEWS        | 11 +++++++++
 lisp/net/eww.el | 65 +++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 71 insertions(+), 5 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 7dd4d14274..3300ac157d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -89,6 +89,17 @@ Customize this option to limit the amount of entries in the menu
 
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
+** eww
+
+---
+*** New user option to automatically rename EWW buffers
+The 'eww-auto-rename-buffer' can be configured to rename rendered web
+pages by using their title, URL, or a user-defined function which
+returns a string.  For the first two cases, the length of the
+resulting name is controlled by 'eww-buffer-name-length'.  By default,
+no automatic renaming is performed.
+
+
 ** image-dired
 
 ---
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 24c6335210..dc20c1745c 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -178,6 +178,33 @@ (defcustom eww-after-render-hook nil
   :group 'eww
   :type 'hook)
 
+(defcustom eww-auto-rename-buffer nil
+  "Automatically rename EWW buffers once the page is rendered.
+
+When nil, do not rename the buffer.  With a non-nil value
+determine the renaming scheme, as follows:
+
+- `title': Use the web page's title.
+- `url': Use the web page's URL.
+- a function's symbol: Run a user-defined function that returns a
+  string with which to rename the buffer.
+
+The string of `title' and `url' is always truncated to the value
+of `eww-buffer-name-length'."
+  :version "29.1"
+  :type '(choice
+          (const :tag "Do not rename buffers (default)" nil)
+          (const :tag "Rename buffer to web page title" title)
+          (const :tag "Rename buffer to web page URL" url)
+          (function :tag "A user-defined function to rename the buffer"))
+  :group 'eww)
+
+(defcustom eww-buffer-name-length 40
+  "Length of renamed buffer name, per `eww-auto-rename-buffer'."
+  :type 'natnum
+  :version "29.1"
+  :group 'eww)
+
 (defcustom eww-form-checkbox-selected-symbol "[X]"
   "Symbol used to represent a selected checkbox.
 See also `eww-form-checkbox-symbol'."
@@ -353,7 +380,7 @@ (defun eww (url &optional arg buffer)
     (setq url (url-recreate-url parsed)))
   (plist-put eww-data :url url)
   (plist-put eww-data :title "")
-  (eww-update-header-line-format)
+  (eww--after-page-change)
   (let ((inhibit-read-only t))
     (insert (format "Loading %s..." url))
     (goto-char (point-min)))
@@ -502,6 +529,30 @@ (defun eww-html-p (content-type)
   (member content-type '("text/html"
 			 "application/xhtml+xml")))
 
+(defun eww--rename-buffer ()
+  "Rename the current EWW buffer.
+The renaming scheme is performed in accordance with
+`eww-auto-rename-buffer'."
+  (let ((rename-string)
+        (formater
+         (lambda (string)
+           (format "*%s # eww*" (truncate-string-to-width
+                                 string eww-buffer-name-length))))
+        (site-title (plist-get eww-data :title))
+        (site-url (plist-get eww-data :url)))
+    (cond ((null eww-auto-rename-buffer))
+          ((eq eww-auto-rename-buffer 'url)
+           (setq rename-string (funcall formater site-url)))
+          ((functionp eww-auto-rename-buffer)
+           (setq rename-string (funcall eww-auto-rename-buffer)))
+          (t (setq rename-string
+                   (funcall formater (if (or (equal site-title "")
+                                             (null site-title))
+                                         "Untitled"
+                                       site-title)))))
+    (when rename-string
+      (rename-buffer rename-string t))))
+
 (defun eww-render (status url &optional point buffer encode)
   (let* ((headers (eww-parse-headers))
 	 (content-type
@@ -552,7 +603,7 @@ (defun eww-render (status url &optional point buffer encode)
 	    (eww-display-raw buffer (or encode charset 'utf-8))))
 	  (with-current-buffer buffer
 	    (plist-put eww-data :url url)
-	    (eww-update-header-line-format)
+	    (eww--after-page-change)
 	    (setq eww-history-position 0)
 	    (and last-coding-system-used
 		 (set-buffer-file-coding-system last-coding-system-used))
@@ -796,12 +847,16 @@ (defun eww-update-header-line-format ()
 		 `((?u . ,(or url ""))
 		   (?t . ,title))))))))
 
+(defun eww--after-page-change ()
+  (eww-update-header-line-format)
+  (eww--rename-buffer))
+
 (defun eww-tag-title (dom)
   (plist-put eww-data :title
 	     (replace-regexp-in-string
 	      "^ \\| $" ""
 	      (replace-regexp-in-string "[ \t\r\n]+" " " (dom-text dom))))
-  (eww-update-header-line-format))
+  (eww--after-page-change))
 
 (defun eww-display-raw (buffer &optional encode)
   (let ((data (buffer-substring (point) (point-max))))
@@ -929,7 +984,7 @@ (defun eww-readable ()
 		      nil (current-buffer))
     (dolist (elem '(:source :url :title :next :previous :up))
       (plist-put eww-data elem (plist-get old-data elem)))
-    (eww-update-header-line-format)))
+    (eww--after-page-change)))
 
 (defun eww-score-readability (node)
   (let ((score -1))
@@ -1161,7 +1216,7 @@ (defun eww-restore-history (elem)
       (goto-char (plist-get elem :point))
       ;; Make buffer listings more informative.
       (setq list-buffers-directory (plist-get elem :url))
-      (eww-update-header-line-format))))
+      (eww--after-page-change))))
 
 (defun eww-next-url ()
   "Go to the page marked `next'.
-- 
2.33.0


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Implement-auto-renaming-scheme-for-EWW-buffers-simple.patch

From 6bd3f685b4602aa478b5e987899e7215af20f25e Mon Sep 17 00:00:00 2001
Message-Id: <6bd3f685b4602aa478b5e987899e7215af20f25e.1634295379.git.info@HIDDEN>
From: Protesilaos Stavrou <info@HIDDEN>
Date: Fri, 15 Oct 2021 13:55:44 +0300
Subject: [PATCH] Implement auto-renaming scheme for EWW buffers

* etc/NEWS: Document the new user options.

* lisp/net/eww.el (eww-auto-rename-buffer-function)
(eww-auto-rename-buffer): Add user options.
(eww--rename-buffer): Introduce new function that performs the
renaming of buffers.
(eww--after-page-change): Add new wrapper function which calls
'eww-update-header-line-format' and 'eww-auto-rename-buffer-function'.
(eww, eww-render, eww-tag-title, eww-readable, eww-restore-history):
Include eww--after-page-change.

Fix bug#51176.

Co-authored-by: Abhiseck Paira <abhiseckpaira@HIDDEN>
Co-authored-by: Protesilaos Stavrou <info@HIDDEN>
---
 etc/NEWS        |  8 ++++++++
 lisp/net/eww.el | 39 ++++++++++++++++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 7dd4d14274..906ff4e6ae 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -89,6 +89,14 @@
 
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
+** eww
+
+---
+*** New user option to automatically rename EWW buffers
+When 'eww-auto-rename-buffer' is set to a non-nil value, it will make
+all buffers use either the title or the URL of the rendered web page.
+The rendering scheme is handled by 'eww-auto-rename-buffer-function'.
+
 ** image-dired
 
 ---
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 24c6335210..14cf207e59 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -178,6 +178,21 @@
   :group 'eww
   :type 'hook)
 
+(defcustom eww-auto-rename-buffer-function #'eww--rename-buffer
+  "Function to rename EWW buffer.
+The function is called just before the `eww-after-render-hook' if
+`eww-auto-rename-buffer' is non-nil."
+  :version "29.1"
+  :group 'eww
+  :type 'function)
+
+(defcustom eww-auto-rename-buffer nil
+  "When non-nil rename EWW buffers after they are rendered.
+Renaming is controlled by `eww-auto-rename-buffer-function'."
+  :version "29.1"
+  :group 'eww
+  :type 'boolean)
+
 (defcustom eww-form-checkbox-selected-symbol "[X]"
   "Symbol used to represent a selected checkbox.
 See also `eww-form-checkbox-symbol'."
@@ -353,7 +368,7 @@
     (setq url (url-recreate-url parsed)))
   (plist-put eww-data :url url)
   (plist-put eww-data :title "")
-  (eww-update-header-line-format)
+  (eww--after-page-change)
   (let ((inhibit-read-only t))
     (insert (format "Loading %s..." url))
     (goto-char (point-min)))
@@ -502,6 +517,15 @@
   (member content-type '("text/html"
 			 "application/xhtml+xml")))
 
+(defun eww--rename-buffer ()
+  "Rename the current EWW buffer.
+Use the page's title or URL as an identifier."
+  (when (eq major-mode 'eww-mode)
+    (when-let ((title (or (plist-get eww-data :title)
+                          (plist-get eww-data :url))))
+      (rename-buffer
+       (format "*%s # eww*" (truncate-string-to-width title 40)) t))))
+
 (defun eww-render (status url &optional point buffer encode)
   (let* ((headers (eww-parse-headers))
 	 (content-type
@@ -552,7 +576,7 @@
 	    (eww-display-raw buffer (or encode charset 'utf-8))))
 	  (with-current-buffer buffer
 	    (plist-put eww-data :url url)
-	    (eww-update-header-line-format)
+	    (eww--after-page-change)
 	    (setq eww-history-position 0)
 	    (and last-coding-system-used
 		 (set-buffer-file-coding-system last-coding-system-used))
@@ -796,12 +820,17 @@
 		 `((?u . ,(or url ""))
 		   (?t . ,title))))))))
 
+(defun eww--after-page-change ()
+  (eww-update-header-line-format)
+  (when eww-auto-rename-buffer
+    (funcall eww-auto-rename-buffer-function)))
+
 (defun eww-tag-title (dom)
   (plist-put eww-data :title
 	     (replace-regexp-in-string
 	      "^ \\| $" ""
 	      (replace-regexp-in-string "[ \t\r\n]+" " " (dom-text dom))))
-  (eww-update-header-line-format))
+  (eww--after-page-change))
 
 (defun eww-display-raw (buffer &optional encode)
   (let ((data (buffer-substring (point) (point-max))))
@@ -929,7 +958,7 @@
 		      nil (current-buffer))
     (dolist (elem '(:source :url :title :next :previous :up))
       (plist-put eww-data elem (plist-get old-data elem)))
-    (eww-update-header-line-format)))
+    (eww--after-page-change)))
 
 (defun eww-score-readability (node)
   (let ((score -1))
@@ -1161,7 +1190,7 @@
       (goto-char (plist-get elem :point))
       ;; Make buffer listings more informative.
       (setq list-buffers-directory (plist-get elem :url))
-      (eww-update-header-line-format))))
+      (eww--after-page-change))))
 
 (defun eww-next-url ()
   "Go to the page marked `next'.
-- 
2.33.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 15 Oct 2021 10:35:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 06:35:43 2021
Received: from localhost ([127.0.0.1]:38251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbKYx-0007Ot-3r
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 06:35:43 -0400
Received: from quimby.gnus.org ([95.216.78.240]:47278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mbKYu-0007Oa-4v
 for 51176 <at> debbugs.gnu.org; Fri, 15 Oct 2021 06:35:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=GaJwbELX92urSAR4UUl52xXvu8YTVyja3uQAjdwY7aw=; b=bsT6woSWoQwJ04vVsa99Lf3zgQ
 1KSvWHvdLdN0iGG8epQvfclP2YW35vRYIj0keVt9uTZJP+yi+PYi/OF/2eZX7+6M++r4q03T2ZSzU
 +AHNtMaWNd3NzEqQbUHdOhmTMcSc37pEBjC3pbgWGHJxUgTSKIkejHsdUCQIRwkNUw7Q=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mbKYk-0003gE-2y; Fri, 15 Oct 2021 12:35:32 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN> <87r1co1x8f.fsf@HIDDEN>
 <87bl3qiysk.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUWBQxTFC7IqqD/
 //8b8hccAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UKDwk3OC9aC0MAAAGQSURBVCjPNVI7bh0xDBwa
 1CtSUQb3AUlvIMegADlAOq4h3cCNc4rkBnbxUqdIAr89pUcGvAuswBU5mo8AGY6PR/YSAOvgWxwR
 WRDFAprZob1qGKCS6zPCqq029sidaUlkRlroy1NEIOelPeM2noiDKuUUuImrEK3J3fcIef6LBT1z
 CvDjn9aAn+Uiii/HT0vU7VvGsE////QF/Zmn2unySAZZXjopnF6/kq94UxPcvD6SuW1DzfFw/UUJ
 tjs5ysO1kPGONG04HU2prI4iIsdxhVJXCeHGcYRTKYFxZjGpOHmYxfn3ZbWN8Ibo0bBB7lv0IkVL
 qQS2ieWDRkWrxBdR0caVPjULcrp3OD3sajVtANsY3DQzoYTUnG7mKbRqFEMfy20zjN01BvMIOh9b
 yWiNxGmISiQpzL05ffOoKnS5c5gR6mo2EgEHkuGZ6ZgA87Um00pnsQnmFHeewGugMHDAtnURmF5Z
 VyB2aoVNRryFCLzN1pWjRGFrSPqW77+UHjp1DV30acXKRVYRlcQyZlL7G1c+VmbbgwPeAAAAJXRF
 WHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTE1VDA5OjU1OjU2KzAwOjAwuPd5kQAAACV0RVh0ZGF0ZTpt
 b2RpZnkAMjAyMS0xMC0xNVQwOTo1NTo1NiswMDowMMmqwS0AAAAASUVORK5CYII=
X-Now-Playing: Sheila Chandra's _Nada Brahma_: "In Essence"
Date: Fri, 15 Oct 2021 12:35:25 +0200
In-Reply-To: <87bl3qiysk.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Fri, 15 Oct 2021 09:31:55 +0300")
Message-ID: <87sfx24lua.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Protesilaos Stavrou <info@HIDDEN> writes: > Please
 find attached the patch which implements a renaming scheme for > EWW buffers.
 I include Abhiseck, the co-author of this patch, in Cc. > > What do you think?
 > > We had entertained the notion [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Abhiseck Paira <abhiseckpaira@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

Protesilaos Stavrou <info@HIDDEN> writes:

> Please find attached the patch which implements a renaming scheme for
> EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.
>
> What do you think?
>
> We had entertained the notion of a single defcustom with more options,
> but ultimately decided against it on the grounds that it was more
> complex.

Yeah, looks good to me, but:

miha@HIDDEN writes:

> With your patch, the buffer isn't renamed if the user presses "l" or "r"
> to go backward and forward in history. I suggest calling your rename
> function from 'eww-update-header-line-format' instead.

Yes, it has to be performed upon all updates.  But putting it in that
function would be misleading, so what about creating a new function
`eww--after-page-change' that would call 'eww-update-header-line-format'
and

            (when eww-auto-rename-buffer-flag
              (funcall eww-auto-rename-buffer-function))

and call that where 'eww-update-header-line-format' is called now.

And we don't really call user options -flag, so rename it to just
`eww-auto-rename-buffer'. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 15 Oct 2021 08:29:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 04:29:17 2021
Received: from localhost ([127.0.0.1]:38033 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbIab-0001lv-Dw
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 04:29:17 -0400
Received: from kamnitnik.top ([209.250.245.214]:40338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <miha@HIDDEN>) id 1mbIaX-0001lk-SJ
 for 51176 <at> debbugs.gnu.org; Fri, 15 Oct 2021 04:29:15 -0400
Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43])
 by kamnitnik.top (Postfix) with ESMTPSA id 8C71E9C707;
 Fri, 15 Oct 2021 08:29:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top;
 s=mail; t=1634286552;
 bh=DNfwLX5F/0F5245yt4yQ8tNusEKO+hx4RAyXWbBrtfQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=yTRXKh6UJ/PKfxT+IYfQuANzyGTNc6P95AFSErA/UngryWjt3k5D4tXMWsHqYigew
 0DC066C4fsG1NZ68y1LyM+KROGD92eA7O9NwnG6xhDp4gBf/SJvXNG/mEDskd9fZpp
 UQOad0L89C5Tk4gkeh2NVrFpUQTZ3qZLAfLGlhj3WZSjzFpshVkWpdVWQU4cn9JW2H
 NPEwX+dJFxwR5sKYvK5kITcsyIXGDgwcN7fVv/6koTpUk5j137/espqOnT2YoeKzFL
 3OKZp1z7TGmBjSH27sPXfeAuUCSzr/rZgeDyUxCoaFS0+uj7Fm3N0VXS8XUBq3HJdI
 /gn2RXoJ3F3Ng==
From: miha@HIDDEN
To: Protesilaos Stavrou <info@HIDDEN>, Lars Ingebrigtsen
 <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-Reply-To: <87bl3qiysk.fsf@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN> <87r1co1x8f.fsf@HIDDEN>
 <87bl3qiysk.fsf@HIDDEN>
Date: Fri, 15 Oct 2021 10:32:55 +0200
Message-ID: <87o87qg020.fsf@miha-pc>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Protesilaos Stavrou <info@HIDDEN> writes: > Hello
 again! > > Please find attached the patch which implements a renaming scheme
 for > EWW buffers. Thanks. 
 Content analysis details:   (2.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: kamnitnik.top (top)]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Abhiseck Paira <abhiseckpaira@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Protesilaos Stavrou <info@HIDDEN> writes: > Hello
    again! > > Please find attached the patch which implements a renaming scheme
    for > EWW buffers. Thanks. 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: kamnitnik.top (top)]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Protesilaos Stavrou <info@HIDDEN> writes:

> Hello again!
>
> Please find attached the patch which implements a renaming scheme for
> EWW buffers.

Thanks.

> I include Abhiseck, the co-author of this patch, in Cc.
>
> What do you think?
>
> We had entertained the notion of a single defcustom with more options,
> but ultimately decided against it on the grounds that it was more
> complex.
>
> --=20
> Protesilaos Stavrou
> https://protesilaos.com
> @@ -556,6 +580,8 @@ (defun eww-render (status url &optional point buffer =
encode)
> +            (and eww-auto-rename-buffer-flag
> +                 (funcall eww-auto-rename-buffer-function))
>  	    (run-hooks 'eww-after-render-hook)))

With your patch, the buffer isn't renamed if the user presses "l" or "r"
to go backward and forward in history. I suggest calling your rename
function from 'eww-update-header-line-format' instead.

Best regards.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFpPLcTHG1paGFAa2Ft
bml0bmlrLnRvcAAKCRCzCRoakhWZP841D/9VxoWV6Omg+xZjr4fx4ZFHQecqo+Ew
CADcoeYDBDEXF4vXJaOxdiws7K2rn/SD62YeEjdsZroUnceP6puvN8Swhl/CclBb
P4TbDIpr/Mr8XWv4JTMKSz8so1qfUKC+p84O3q8jHt2MxixLMwehRxUlCZBlZUyf
6LMCuvhuDMoTh8s+n6Uf8bI5bQXFr7gAArcnJiAUtnmZA/ZCi2paoGCXrdXNKzH+
6FCuhs9Ueawq/TftMfIvwTlRVL21IHGjZsI4LAS/V5jTW7HamJJ8/qWQjwYJLXfV
hc7PY/HVrWu/G/0JtYa+zeRF6PbX2nNvYb9lSQzQkuoGBHQdh/YxJm3r8JJ/R1zD
6/5rVO8OohSYBbe4YhqaHADjIIhofnfI54jtx3gzKBUUBBSis0cOHHfNe3L5Niit
2EiYkRTOQm0OnJYrjzMdj+6VoUv8jHqYP3G8vcE0NcK78vF6IyuGvhihT23hpfzh
67aj4z+PAro131/91n8yirRSd86tX0hlJwae2lEg7yOHA5fH402r2UuhVKrLb75U
SjHm7bp8nqqKyQwwo4j8Bn6XbdWBL2Yen4eilPAHbpXQb0SXHCN2sOi6SYiCn7TQ
mMYmdEOJajZYJjKo0qNFkbG2Q2PbkcCyKxw+r2vhtnSlDkcKKR01fk3D/VSkA3In
f8MWqMNHid0slw==
=yHh7
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 15 Oct 2021 06:32:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 15 02:32:09 2021
Received: from localhost ([127.0.0.1]:37856 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mbGlF-000788-D4
	for submit <at> debbugs.gnu.org; Fri, 15 Oct 2021 02:32:09 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:36579)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1mbGlB-00077W-EQ
 for 51176 <at> debbugs.gnu.org; Fri, 15 Oct 2021 02:32:07 -0400
Received: (Authenticated sender: public@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 275D0240006;
 Fri, 15 Oct 2021 06:31:56 +0000 (UTC)
From: Protesilaos Stavrou <info@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-Reply-To: <87r1co1x8f.fsf@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN> <87r1co1x8f.fsf@HIDDEN>
User-Agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Fri, 15 Oct 2021 09:31:55 +0300
Message-ID: <87bl3qiysk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Abhiseck Paira <abhiseckpaira@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

On 2021-10-13, 22:33 +0200, Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> Protesilaos Stavrou <info@HIDDEN> writes:
>
>> 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.
>
> Sounds good to me.

Hello again!

Please find attached the patch which implements a renaming scheme for
EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.

What do you think?

We had entertained the notion of a single defcustom with more options,
but ultimately decided against it on the grounds that it was more
complex.

-- 
Protesilaos Stavrou
https://protesilaos.com

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Implement-auto-renaming-scheme-for-eww-buffers.patch

From add8dabc4f3f33707f069865794ec53b2e0e4037 Mon Sep 17 00:00:00 2001
Message-Id: <add8dabc4f3f33707f069865794ec53b2e0e4037.1634279302.git.info@HIDDEN>
From: Protesilaos Stavrou <info@HIDDEN>
Date: Fri, 15 Oct 2021 09:24:04 +0300
Subject: [PATCH] Implement auto-renaming scheme for eww buffers

* etc/NEWS: Document the new feature.

* lisp/net/eww.el (eww-auto-rename-buffer-function): Introduce user
option to specify the function which performs the renaming.
(eww-auto-rename-buffer-flag): Add toggle to control the behaviour,
keeping it off by default in order not to surprise existing users.
(eww--rename-buffer): Write function to rename buffers.
(eww-render): Call 'eww--rename-buffer' at the post-render phase, if
appropriate.

Fix bug#51176.

Co-authored-by: Abhiseck Paira <abhiseckpaira@HIDDEN>
Co-authored-by: Protesilaos Stavrou <info@HIDDEN>
---
 etc/NEWS        | 11 +++++++++++
 lisp/net/eww.el | 26 ++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 7dd4d14274..54d554ee0b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -89,6 +89,17 @@ Customize this option to limit the amount of entries in the menu
 
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
+** eww
+
+---
+*** New user option to automatically rename EWW buffers
+When 'eww-auto-rename-buffer-flag' is set to a non-nil value, all
+rendered web pages will have their buffer renamed from the generic
+"*eww*" to a name that includes the web page's title or, if that is
+absent, its URL.  The renaming scheme is controlled by the user option
+'eww-auto-rename-buffer-function'.  By default, no automatic renaming
+is performed.
+
 ** image-dired
 
 ---
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 24c6335210..2104d09696 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -178,6 +178,21 @@ (defcustom eww-after-render-hook nil
   :group 'eww
   :type 'hook)
 
+(defcustom eww-auto-rename-buffer-function #'eww--rename-buffer
+  "Function to rename EWW buffer.
+The function is called just before the `eww-after-render-hook' if
+`eww-auto-rename-buffer-flag' is non-nil."
+  :version "29.1"
+  :group 'eww
+  :type 'function)
+
+(defcustom eww-auto-rename-buffer-flag nil
+  "When non-nil rename EWW buffers after they are rendered.
+Renaming is controlled by `eww-auto-rename-buffer-function'."
+  :version "29.1"
+  :group 'eww
+  :type 'boolean)
+
 (defcustom eww-form-checkbox-selected-symbol "[X]"
   "Symbol used to represent a selected checkbox.
 See also `eww-form-checkbox-symbol'."
@@ -502,6 +517,15 @@ (defun eww-html-p (content-type)
   (member content-type '("text/html"
 			 "application/xhtml+xml")))
 
+(defun eww--rename-buffer ()
+  "Rename the current EWW buffer.
+Use the page's title or URL as an identifier."
+  (when (eq major-mode 'eww-mode)
+    (when-let ((title (or (plist-get eww-data :title)
+                          (plist-get eww-data :url))))
+      (rename-buffer
+       (format "*%s # eww*" (truncate-string-to-width title 40)) t))))
+
 (defun eww-render (status url &optional point buffer encode)
   (let* ((headers (eww-parse-headers))
 	 (content-type
@@ -556,6 +580,8 @@ (defun eww-render (status url &optional point buffer encode)
 	    (setq eww-history-position 0)
 	    (and last-coding-system-used
 		 (set-buffer-file-coding-system last-coding-system-used))
+            (and eww-auto-rename-buffer-flag
+                 (funcall eww-auto-rename-buffer-function))
 	    (run-hooks 'eww-after-render-hook)))
       (kill-buffer data-buffer))))
 
-- 
2.33.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 14 Oct 2021 16:17:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 12:17:23 2021
Received: from localhost ([127.0.0.1]:36924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mb3Q3-0004we-H6
	for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 12:17:23 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35331)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mb3Q0-0004wN-O0
 for 51176 <at> debbugs.gnu.org; Thu, 14 Oct 2021 12:17:21 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 43A9940002;
 Thu, 14 Oct 2021 16:17:12 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
Organization: LINKOV.NET
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87a6jc4hc7.fsf@HIDDEN>
Date: Thu, 14 Oct 2021 19:05:01 +0300
In-Reply-To: <87a6jc4hc7.fsf@HIDDEN> (Yuchen Pei's message of "Thu, 14 Oct
 2021 10:48:08 +1100")
Message-ID: <871r4oowuq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> On a related note, I also have a function defined in a similar fashion
> switching to a shell buffer by prompts.  Are people interested in having
> this as well?  I don't see a shell hook like eww-after-render-hook that can
> achieve this though.

project-shell uses project-prefixed-buffer-name to generate
project-specific buffer names, but not with shell prompts.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 14 Oct 2021 11:06:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 14 07:06:30 2021
Received: from localhost ([127.0.0.1]:34777 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mayZC-0004AL-7X
	for submit <at> debbugs.gnu.org; Thu, 14 Oct 2021 07:06:30 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34620)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mayZ5-0004A4-Vg
 for 51176 <at> debbugs.gnu.org; Thu, 14 Oct 2021 07:06:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EVyIFa8GJOdaY/UqkwaFMW2EI/5IGeQxavfiO0WA4rs=; b=XOlOLemZfh+abmrfIjpG2IN3j7
 OqmMlN44sxKnK3FOwQfyvatRvxRwPHxuGUWAk9OnahmklqVqex+FPPx07NPi5Oxwa5l47/FNbke2D
 FD/JrYCyhiAAyLvuMBI9zs8j9//G4GCZS915abtaMIVBfATDc7mdXv+RrUFn7rUFgi9s=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mayYw-0001Bf-Re; Thu, 14 Oct 2021 13:06:17 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87a6jc4hc7.fsf@HIDDEN>
X-Now-Playing: Laurel Halo's _Quarantine_: "Light + Space"
Date: Thu, 14 Oct 2021 13:06:14 +0200
In-Reply-To: <87a6jc4hc7.fsf@HIDDEN> (Yuchen Pei's message of "Thu, 14 Oct
 2021 10:48:08 +1100")
Message-ID: <87sfx3zx09.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Yuchen Pei <hi@HIDDEN> writes: > On a related note, I also
 have a function defined in a similar fashion > switching to a shell buffer
 by prompts. Are people interested in > having this as well? I don't see a
 shell hook like > eww-a [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Yuchen Pei <hi@HIDDEN> writes:

> On a related note, I also have a function defined in a similar fashion
> switching to a shell buffer by prompts.  Are people interested in
> having this as well?  I don't see a shell hook like
> eww-after-render-hook that can achieve this though.

Perhaps you can do something with after-change-functions in comint
buffers -- comint-last-prompt has the location of the prompt.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 14 Oct 2021 00:16:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 20:16:26 2021
Received: from localhost ([127.0.0.1]:33983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1maoQ6-0002AR-HA
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 20:16:26 -0400
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:32284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1maoQ0-0002AD-Us
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 20:16:24 -0400
Received: from pps.filterd (m0246632.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19DMYO47019525; 
 Thu, 14 Oct 2021 00:16:20 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2021-07-09;
 bh=yfI8cLtlwCogszmmbkn9kbHjyluigTZ1yJCDmJ8E9xA=;
 b=KTLu7Kfp6HDAUBnvTigKIQHfbcqihzT9l3eYgl6G+LuWuCmyQjGQ6rda+bAyXhbBTxPB
 nOxtctT1ZSNJwt6j16jmJXbPv4AtCNV2R4o7DsouRRaSoTBFCzGpHN6faUxGPneNjRWr
 gjoRSCPMbBtszumoyJsTq3mW7a45s7zAuWsOK/K6uCvN5Sce1icKHCdcDHeeW/n2uahh
 F4UkijB3NmSf8NaOC3KNlfqDfon8/8p0RJVz9tL98b5bKyDEJAZuschZBAgGH1Yo4mxt
 ZSkCcECvsJA5P9n1XxszXZqQ14rnmheMR8ikC5tmnTZR2UY80Zv93AmWb8ZiozBv2H1g 8g== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by mx0b-00069f02.pphosted.com with ESMTP id 3bnkbugc10-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 14 Oct 2021 00:16:19 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19E0FBD8107160;
 Thu, 14 Oct 2021 00:16:18 GMT
Received: from nam12-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173])
 by userp3030.oracle.com with ESMTP id 3bkyvbqq17-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 14 Oct 2021 00:16:18 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=VBzhJPYOb+Hg/a2qWRCcAZlLpZx4Q7yCxnFQ1ZrGqzLbr5VgYk9lBay6R6rFZoZFHZ+dN0mlMk229ER2s2j3dKqdyQMsJoL8WspONuCJbpe1Dxb7xDwKsCuSfvjt7EjrtZ1tDLQzFkiu8h927C9+7IVvwkeHo/socpPDdeMizI0lmyOeAjDjGxaBjUNzdmRrAOz031SJPlf7m2mynVIJue4ArTtQdDwwwW9feDby6/l8SYK4OHwpie505b+ERrB4JOUE875nT3H58MoQgwB7my+0ik2nD3c/SQL1g1xfyxEjInpjBeEfbU3fkM8f0NhgxnswmprdWagaMKs0Wp1jZw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=yfI8cLtlwCogszmmbkn9kbHjyluigTZ1yJCDmJ8E9xA=;
 b=GcbdPkwZYBM6m4xVxGkkxRCHYLm6rOb1ToCeD3oIt3SAdXAX+mD8HKzUgG4R0hcPGLZAgmVrFBoF1BNrTrMR85c+li+bij0kJgXrZqXDorxPtBS9Wsd75depzHkeeNBG3aOAflUOY5cQQXPE70A/LBwyG9Em6u9IxUoTakAZ4WID4tz4PaIwHYRDyQKXM5BLA3kLBq7YwZQ4snaI2skQ9q03C88SJrK/GsYibRSWra37x+tGHnxubmlcpXAZNXw9t6CH/0Xi5dWSYy7FySFpaEYgkJwuPJVGtOhr50Pp5FZdB02NIIrecdmc/Xp914ICPOM7lIkHlfQWjRcyR1Q0yQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=yfI8cLtlwCogszmmbkn9kbHjyluigTZ1yJCDmJ8E9xA=;
 b=ysZ10QiuBxRIgafPS4BNYXyVdeRxhUawNn6pBSE8gaXnwz4mkK4lP4gxO6aHYqSDJICtAXUCMGa1xFIeOGIHkh4MqjU+mr2nf4XF9UXVkjzrco7hDA8GiVBVgGfJ1dddLd/82kAW/Xq2GTOuKFXhYj/h7g18Yzspu9WuJZYbff0=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by BY5PR10MB4035.namprd10.prod.outlook.com (2603:10b6:a03:1f8::33)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Thu, 14 Oct
 2021 00:16:16 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82%7]) with mapi id 15.20.4587.026; Thu, 14 Oct 2021
 00:16:16 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>, Lars Ingebrigtsen
 <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: [External] : bug#51176: eww switch buffer by title
Thread-Topic: [External] : bug#51176: eww switch buffer by title
Thread-Index: AQHXwHFlkHIIZVwGd0GtvMfRrUvn46vRndJA
Date: Thu, 14 Oct 2021 00:16:16 +0000
Message-ID: <SJ0PR10MB54884D6C4B46DB6F68EC2A7CF3B89@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN>
In-Reply-To: <87pms8psyt.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: protesilaos.com; dkim=none (message not signed)
 header.d=none; protesilaos.com; dmarc=none action=none header.from=oracle.com; 
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 80590d3e-b9d6-4976-bfb7-08d98ea7d6c4
x-ms-traffictypediagnostic: BY5PR10MB4035:
x-microsoft-antispam-prvs: <BY5PR10MB4035B06A58674DA402845457F3B89@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: sV8OH98Lv2VbKlieR9nTKA/5QEme6l9AjVV14vkkzTnv6cNs4y7p14fDB/tgyQ0kjUkTt7DxAONdWJyeEXX9MabwL06D+GQg1iG33S4gJNyA96A3hozKY3psXPAUgDgmrYl9m+GEUvfzvbsiPMW0i2dr0l5ACc+wSdVlRC8gOx7i2sh/IzC/BYzoxTzfAODdUKwRE+WwkInDiATvSmQONVNCqdSFuivA1bQ6cDjiC1hzkVy54SU3HHfGqFc/7SNCONZAhI5QMhvuHtzYUISZS1yUQP2mkTaRk/Y4Kj7ZJxPnyEuJZyJKlWn9JvenG9sVnBOWZG2kl8RFifUxZl28N944KFjYWsYE2Yx/5vMWoMsdGRZFG2qgzN8XpHOZAF3S9Z+kqEhsSdXUjK41IjpAdreyIrZkFYtHpcJw6/iTMHOEogJEiWahYXgt9/lnoWvVsbF7ZtqZl93Rj5UHkYm31iFuYFuURMS+pRT+Wcdnj6g+72xWOCY2zriDF+gePyOZnozRiZ8fvz6vTZDARXWKFu06Y5rpAzOOJvgoPYA353EH0nm+5MGCxfdV3nKE/aapAJ+0JAYw3S1N8qIgCq+ogdQnEU5QKgq2Gz0SeZ7jVx1MnUjMT7Yby6NarpoauTPLC8nN+ok/VE2gnGhWagTUH2GLiijAVYwuCc+rhU9EdYS7djBSl/mw7AgKQFsFH+1vE4vTxJQniaViFDCqMPQ1RQRd7nt+2AhSfGhAfRK2RW6iQJzd0ojOrC/SoWvfheYM+Ik1PwP8p7C1QFdeL4pS2sBcTBcHpIZTGO5bfZOolh2lV9IAUczETzzm2wuBMr8V
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(366004)(966005)(8676002)(33656002)(6506007)(55016002)(4326008)(86362001)(9686003)(44832011)(76116006)(7696005)(316002)(508600001)(5660300002)(38070700005)(64756008)(66446008)(71200400001)(186003)(110136005)(8936002)(26005)(66556008)(66946007)(38100700002)(122000001)(66476007)(54906003)(52536014)(2906002)(569784001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qjPdyg8ggcrjCTbiMubuKQl+/sALMweaPirkxXVNLT0+DC1ubK6tgK9UQYmp?=
 =?us-ascii?Q?Md8p9ByoHlk2zFQBGjkJOmD9JJCmBddg/A629A7xrtPsIRdll2/72Jg3takF?=
 =?us-ascii?Q?mC/TtyD9PoIamb2jP5F8xhn4pGiOPxc8ZcfphOMos0d56ucFgjDFwr4X3J1C?=
 =?us-ascii?Q?rWfpiY3GmevdfUSbVXVdFwDDZx2eaxcxc4dUtAHuDIk2sqICQQ583suML1rq?=
 =?us-ascii?Q?fCiQAmnzQUEgt0VnVQzUc3H4xTODskf+/AWek+Pn/i1nfKxj2jdthO9gvryF?=
 =?us-ascii?Q?epveYGkiEk+d80eEbMCnilUohfUXO15v2eQj5Y2W5lgT2ZttEtogAymhw06k?=
 =?us-ascii?Q?UgQpcuQYQzdthmwtxFkoIb5+WpXJHrXgJIcsJDad10qPkhk0YVoSIHrrpWMo?=
 =?us-ascii?Q?xk9arf4LlyldOkWimB1rkKjkHRUu1QigRRyHY/vkvzx1B/uM3RHiUtXE6pjH?=
 =?us-ascii?Q?iLwutqyDjDt+HrCS0cw8NWnT5QC97zxz9OSoQlgDgGvE6U4KVQaeTWcjWzTe?=
 =?us-ascii?Q?YtqBe6FuGOuqFirp48hD+PPSlz+zjHaWajXvX92MgSohO//LnSWtgMF3DIXe?=
 =?us-ascii?Q?/4LtZH1TqnOe/9Hj1y0NwHBgNIfmIBfE8lfZjRvu1CDn1iPsgcdBn8ODwc2G?=
 =?us-ascii?Q?QvG1tasjLvss7CSikQmscQo8RbyWpoGF6uafzO1SSn61J8JNneRc5C4OU0Ha?=
 =?us-ascii?Q?SBaqYdcWGbeiLyGYPs40MuA+7rrxiK//Ah8BYAQJhADSmG4gu1Th8RFW9LRO?=
 =?us-ascii?Q?IoRFyPG4No5EIFmCi2ZdfDZ/Wx2H71Nor4TRiLryiGTnca0YlR/7Z2qTuIwW?=
 =?us-ascii?Q?A9N1T4I3YBTngYp5nB4z0kSrQDrHUiKqWGu6yETic7mKtgb4Eioi4Zgdyr/3?=
 =?us-ascii?Q?6EDbjN2jP3nPWha90s3GmBxp5uw6EnR1lw+TlfsUWLXvHuUKjdxBVb0+rqlv?=
 =?us-ascii?Q?X30791sJuw6T18QnHx2oSbfC0lGD0G1FHG33akREa0lkOXdIAp1rQVRDR1sz?=
 =?us-ascii?Q?vuuA5vEoTyb0kIoAFoj93riuS2Z4s0sRmbZubPXIvfbh6l5f1eZjaD8aGi2Z?=
 =?us-ascii?Q?6KdY/yw+1TVcLAhfQkRnrHvujUf5AWeFWSszPoxKgktT87Bjw9oQse8APExN?=
 =?us-ascii?Q?K9RvB+OPTANFrXPaSClQ8K78XWKFul2JmXvEnvgveYHLfJTQUORnebvSe2s4?=
 =?us-ascii?Q?9KedYKFVYfI08ZLoCNP18u9xHaR3A5sGsjiPeaMlxVIsh+N60xOhCEaq8dnR?=
 =?us-ascii?Q?2xp5fzpFiPclDmdRnoVMTNRt//pxnBeYlrDXMC22NVtheo1ouzyPqjPpOmIA?=
 =?us-ascii?Q?/f4=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 80590d3e-b9d6-4976-bfb7-08d98ea7d6c4
X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2021 00:16:16.2745 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: CGjow7IpjhaxWp9izACCkNbmPNaEW0F19spvdxJP04LR2om4pTUQvu5o1uQyitt6U+LKqX5TOU22KM03PhPv/g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4035
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10136
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 phishscore=0 bulkscore=0
 malwarescore=0 adultscore=0 mlxscore=0 spamscore=0 mlxlogscore=816
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001
 definitions=main-2110140000
X-Proofpoint-ORIG-GUID: gM1VAidEcCC8dF2saYbnfXWjBlAlfJpc
X-Proofpoint-GUID: gM1VAidEcCC8dF2saYbnfXWjBlAlfJpc
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 51176
Cc: "51176 <at> debbugs.gnu.org" <51176 <at> debbugs.gnu.org>, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

> >> 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 t=
o
> > rename the buffers this way would be nice.
>=20
> 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 us=
e
> either the page title or, if that is not available, the page's URL.
>=20
> 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.
>=20
> 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 o=
f URL"  url)
          ;; Any symbol other than `page' and nil is treated the same as `p=
age'.
          (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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 23:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 19:48:26 2021
Received: from localhost ([127.0.0.1]:33977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1manz0-0001SZ-4N
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 19:48:26 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:42363)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1manyv-0001SE-UY
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 19:48:25 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id AA6F93201AF0;
 Wed, 13 Oct 2021 19:48:15 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute4.internal (MEProxy); Wed, 13 Oct 2021 19:48:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=
 references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm2; bh=BvpAsdl16swzo+Tayhv46e1jIi
 3DGw+TfR3iYma9LI4=; b=PcFJTNAsO7IFCUnB8Y9ogV3M2/xZD94i/ttIXMOVs6
 BxfTmwOzI3kRMUno95oNw/txHPYpEZcVQq/Mg5rhRJ7yq/qwitOJfVCyptv9IgjW
 1YuhDVwGPqmfPELPxdBNiFhcPAnFKRoyvvuJhehFU4pCYLdLTOUfZwPY+ApUlgNS
 VjFFrFVp2JzFMSeqQbFOL9wBX7Jx+T9SC4S8kr4kHZyI0YGXDPTWLuQvzmuyf7aW
 UITYu7gJyCJIXzXRKLG44nkpWS0Gpuhe0EqPtpdvxCXG2Xk1Yx82AKd8PEl7l52n
 eYcZldKg2zeIeaIMipl+PnI8Hx+bbGVVcezea1/q5HQg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=BvpAsd
 l16swzo+Tayhv46e1jIi3DGw+TfR3iYma9LI4=; b=YZZeH58Jla3wWkeDPGkdj1
 VNJp4wfJY1Bnf1MuSBgcAuw2IRz26I5pcZp9R7kigu8WUBx5v4I1fovyX4nx9yLa
 HlbScqLN8DAzglTd3IguCuB4gNuIt9yXHPe9AygSUPrtlVzFyqzKb0QDJJxTrL2i
 W3wTV706Ai+olShcCacgxJqWgJ9RysfsA4lHKL2qmiNd3u5bVMSW4d7EH4PABtv2
 biZk7uB6eLJISvncsDIHYtuXj6icqp0AknGaJrIPVjS450KaCZzy2ct0pR6NVdpT
 FPez5cu1/JAwKLrU6R6lUuT7iM4AIqPpQzsdwZS8PCNURcj1KWZLeQYoEMVCsKVg
 ==
X-ME-Sender: <xms:P3BnYU7faUfoBioqeMGW9R6LW8FiUYG9zAv1B5oPfo2fZS6heWqzQw>
 <xme:P3BnYV5Ekk6re5A6q2snDoEekhkJeW70yyJYjT4qSkDuQeLpZs-PgtF93AQ3UMSpr
 Zu7lD3mLA3FZhCqtg>
X-ME-Received: <xmr:P3BnYTfou18c0uKQAD8-EQTWDv2tj8okIWWYq9_mCENJbFgbVK6wRoORAzu1SXKmFZV5V_bdCahbXAq9zblrH0BxeymrkJo3tAMJ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdduuddgvdduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufgjfffkgggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgv
 nhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnhepkedtfffhle
 eigfehueevieeuueekvdfgveegheeiudeuffdvgfejleeijeevheetnecuffhomhgrihhn
 peihphgvihdrmhgvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhephhhiseihphgvihdrmhgv
X-ME-Proxy: <xmx:P3BnYZK1Op9R6MKNilFmCa-AJGH9nEMLCHKr4MBSCMBBxwb26bacSg>
 <xmx:P3BnYYI__MVW5u0VY_ze56zt7Igk0bs9kqyP-HfgRla6zbx6GGi0oA>
 <xmx:P3BnYaxyNLbsqjzbTstA6JM9nrHtRaYHggHn1_V2p0lUzl0CVrJhsw>
 <xmx:P3BnYSghyAThzYafOsYC8sFgfYX8cnqCKBfXiz82Kj39tOahPZJOsA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 13 Oct 2021 19:48:13 -0400 (EDT)
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN>
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-reply-to: <875yu0x256.fsf@HIDDEN>
Date: Thu, 14 Oct 2021 10:48:08 +1100
Message-ID: <87a6jc4hc7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Juri Linkov <juri@HIDDEN> writes:

>>>> 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.

On a related note, I also have a function defined in a similar 
fashion switching to a shell buffer by prompts.  Are people 
interested in having this as well?  I don't see a shell hook like 
eww-after-render-hook that can achieve this though.

(defun get-comint-prompt ()
  (save-excursion
    ;; more useful than (beginning-of-line) to move past sticky 
    part
    (forward-line 0)
    (let ((end
	   ;; font-lock-face should be comint-highlight-prompt
	   (next-single-char-property-change (point) 
	   'font-lock-face)))
      (buffer-substring-no-properties (point) end))))

(defun shell-switch-by-prompt (prompt-and-buffer)
  "Switches to a shell with selected prompt."
  (interactive
   (list
    (let ((com-table))
      (dolist (buffer (buffer-list))
	(with-current-buffer buffer
	  (when (equal major-mode 'shell-mode)
	    (add-to-list
	     'com-table
	     (concat (get-comint-prompt)
		     (propertize (concat " " (buffer-name))
				 'invisible t))))))
      (completing-read "Shell prompt: " com-table))))
  (string-match "^.* \\(.*\\)$" prompt-and-buffer)
  (switch-to-buffer (match-string 1 prompt-and-buffer)))


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYWdwOAscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0GELAQDtc0I6YOGZWuZHcKXuCjVoAudrmLlCxr3yXki+OGTE
2wEA0JsgI193+2uz44O40phEKDQrw+co7lwFcNQasaoI0go=
=+Hjw
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 21:26:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 17:26:37 2021
Received: from localhost ([127.0.0.1]:33750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1malll-0001uo-Bf
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 17:26:37 -0400
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:42975)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1mallg-0001uU-B6
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 17:26:35 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id 6A163320152C;
 Wed, 13 Oct 2021 17:26:26 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Wed, 13 Oct 2021 17:26:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=date
 :from:to:cc:subject:in-reply-to:references:message-id
 :mime-version:content-type:content-transfer-encoding; s=fm2; bh=
 2WVNK5Zsj1OS9gmO6ciyv5cnwxJlk9whzaB3WzuDBDI=; b=siUqy6rsOdyirrcu
 sy1gZpX7I5Sw63De6ZYSXh3CoeVEwyAZyvKhodKjwiX90mvBlpVnBAJA2S/OJr1A
 HoZDMN7w4y62lHFNwdKPb3SJAp6jv2D4wmBlbEqDVEA4Sayca+CL+Kyy+Zh5rWfI
 i6P1LD34GD9D6F/IFKGMjysMaUQL1wPA3h61SvLbZjim6uHQ61XSBiPdk866STnb
 zJpzHih1hgF0DICNHnvUKuS6nSijg+vf2uJ0FN43JI1K3+waIHmV1NKwbv3g0Sqw
 LW+VhfHP0krcMcG967fTG/paBque/95Pk9ibR36vmkXaOqUXh1cO9pf86NRm4P8e
 RL4WJg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=2WVNK5Zsj1OS9gmO6ciyv5cnwxJlk9whzaB3WzuDB
 DI=; b=PUaybGCp5m3KeVKyVZjEmwKg6BvaNXTHTyk1e3AiKMOCyOfPZW4fy534v
 +CFgrpOx5NMYmSYHMeG0w8saZoL1/W3fgaiQk6XA9WJb5h5F8HwzSwFFVQ8iJ9c3
 Jctg2SqcxEuLaD9NwjcbrxqnfgTVVHc0ILeNqLQHaJGA1lCfZwUzP82RfpULTwtk
 REpD0Dput+ENZWQssPlBTCqEnVA7rM+MmDm/xTcVaRJTd3PHVkQYlE2a5WZjjLaJ
 NZTYOoCge2Q7evtVh5lKCnYkiszKO8RGjBSUb3cuEksw8VQGkvjEs96l5SrF5aSA
 WZpQomJs7+hiv9QtUD8ecjZdKgm3Q==
X-ME-Sender: <xms:AU9nYX-PbQLVPfVefNkycMZXeR2qoDTWGaIIUPI2bdAmwDfM_aPhzQ>
 <xme:AU9nYTtPnCq3JmmQZTm-tGpPRV7l8HVMo8LkPHkTl4ui5aV6MlCVmJgFsoGBwShDE
 qgaCN3_IQtmTAjYZA>
X-ME-Received: <xmr:AU9nYVAWgb9B_BdyCjPX9hQzE3uRVgm1UblT22x5BrQc6iZExomqgLtYj3feVZIzNqnr3GobiTrGlu3mBqmQuQ9mCBufhvpBjSnNi1axvuk>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddgudehkecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpeffhffvufgfjghfkfggtgfgsehtqhhmtddtreejnecuhfhrohhmpegjuhgt
 hhgvnhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnheptdefke
 fgteejgfevteevgfejudduieehvedvvdejheeffffgvdejtdegjeelkefhnecuvehluhhs
 thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhiseihphgvihdrmh
 gv
X-ME-Proxy: <xmx:AU9nYTfMpbpvhb5T7kVO-vI5UkKFiF1IbUstmcEwY0H9_WZSNw70Wg>
 <xmx:AU9nYcMhCZ_tGhik2_fc-oOQ8mLl9u56iD3dLD32p9rI0Q89_hiO3A>
 <xmx:AU9nYVku46UP6FkOPvpT-kg6AL03LX_Jd_CckkxWcxWVZAOWhl-0Gw>
 <xmx:Ak9nYVaEH-eq4pdZ1qmMRGB5OvdJDPzDgAeMsd7ZrxjRVP1wfKvXBw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 13 Oct 2021 17:26:24 -0400 (EDT)
Date: Thu, 14 Oct 2021 08:26:18 +1100
From: Yuchen Pei <hi@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
User-Agent: K-9 Mail for Android
In-Reply-To: <87pms8psyt.fsf@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN>
Message-ID: <F5041878-4400-4215-B708-0E8EED6C6D5D@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 14 October 2021 07:31:22 GMT+11:00, Protesilaos Stavrou <info@protesilao=
s=2Ecom> wrote:
>On 2021-10-13, 20:14 +0200, Lars Ingebrigtsen <larsi@gnus=2Eorg> wrote:
>
>> Juri Linkov <juri@linkov=2Enet> writes:
>>
>>> I see=2E  Then maybe in the existing hook `eww-after-render-hook'?
>>
>> Yup; I misread the code -- that looks like the correct place to put it=
=2E
>> But I can also see many people wanting this, so perhaps a user option t=
o
>> rename the buffers this way would be nice=2E
>
>That is right=2E  I am preparing together with another person a patch tha=
t
>auto-renames eww buffers after they are rendered=2E  The idea is to use
>either the page title or, if that is not available, the page's URL=2E
>
>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=2E
>
>I expect the code to be finalised within the coming days, in case you
>have not done the work already=2E
>

Sgtm and looking forward :)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 20:33:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 16:33:17 2021
Received: from localhost ([127.0.0.1]:33703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1makw9-0006tV-4s
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 16:33:17 -0400
Received: from quimby.gnus.org ([95.216.78.240]:55710)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1makw6-0006tE-3k
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 16:33:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=4aSj+inqA0cAw2T47gg0MpJIr/2IXyG10qKikWnwyUc=; b=BQIWyy16/4Au6pjTZvbaUmlSr0
 pEEbLBPthUiE3th0Z1it3QhVzanoqdbE8CZkw0MwRITJtO6EnrRIZnhWbfSQSf5LmWnCKtaq+M2tX
 cxDkQuSIHTrTJTc/BJ5JaVNDxCJsB16EVtaUUwzqzy+/n/O2xpJwfoXb41mTtGAJsmkE=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1makvx-0003M8-G4; Wed, 13 Oct 2021 22:33:07 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
 <87pms8psyt.fsf@HIDDEN>
X-Now-Playing: Elysia Crampton's _Elysia Crampton_: "Moscow (Mariposa
 Voladora)"
Date: Wed, 13 Oct 2021 22:33:04 +0200
In-Reply-To: <87pms8psyt.fsf@HIDDEN> (Protesilaos Stavrou's message
 of "Wed, 13 Oct 2021 23:31:22 +0300")
Message-ID: <87r1co1x8f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Protesilaos Stavrou <info@HIDDEN> writes: > 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 [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Protesilaos Stavrou <info@HIDDEN> writes:

> 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.

Sounds good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 20:31:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 16:31:34 2021
Received: from localhost ([127.0.0.1]:33692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1makuU-0006qX-7U
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 16:31:34 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:50223)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1makuS-0006qH-9k
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 16:31:32 -0400
Received: (Authenticated sender: public@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3C604C0004;
 Wed, 13 Oct 2021 20:31:23 +0000 (UTC)
From: Protesilaos Stavrou <info@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-Reply-To: <87wnmg3i8f.fsf@HIDDEN>
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN> <87wnmg3i8f.fsf@HIDDEN>
User-Agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Wed, 13 Oct 2021 23:31:22 +0300
Message-ID: <87pms8psyt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 2021-10-13, 20:14 +0200, Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> Juri Linkov <juri@HIDDEN> writes:
>
>> 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.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 18:14:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 14:14:24 2021
Received: from localhost ([127.0.0.1]:33355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mailj-0004Rg-QC
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 14:14:23 -0400
Received: from quimby.gnus.org ([95.216.78.240]:54340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mailh-0004R8-Uv
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 14:14:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VT62o2MePq0SMRZntTHvnzO18ViLczP5aK4iAruvBTM=; b=ZjhISqS6C//RD5Y5hf7BjaRURQ
 MLrCRRWcSKYoHF5F0mhdKdNKq/lya7EBEHRq2vh3O4rpkMDqoNjcwcWFZf8TV5glaYiU18Wqsf/oJ
 FQY9toyysPYqM0IsGWh1ztMgUO5QTunZy8jr02mtOhwZw31S4WSIcbsb93K8F8tVQ7nM=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mailY-0002CL-W6; Wed, 13 Oct 2021 20:14:15 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
 <875yu0x256.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEURDhVJTEx3g3H/
 //+NUZyMAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UKDRIMOzCbMdsAAAFfSURBVCjPTZKxTsMwEIbP
 FY5oJ5CSSukO4jGSIcwB+SziOa4UPwVdOhepjkgnhqZS/JSc7RBxkz/9d77fdwagqLBmJwiRAsc3
 9R3O7UtunDVTANM4jZP7gQeCZ8RHZcciKBkAk24GYGPjFIHxsDoiXuW17D89VJkSmyIRvhWHvXMI
 uagJyt7cBlU8YQuQHG8asautFsBwkI7iC3UFmxEVnbFHrGDVMi9QXnYHrM48WHPiKd2WRKiDnd3F
 DXttzhGsGdRo4lOVRdtpFZUOETV2bXDWjUTYiaiMKBGnJg6BPFDiDNaDWYBCDf8Auz8YF9hbdATt
 rMhpgZ1/2AKjLxHRaOKCnwgygAzDXl1uvlETIJGTXdokoUt5jftBeWawjfNIC9bVfIrL4gBb58S8
 OGLEeYtkwRfPnwLWNJ/iIy1D6r18XR8a7IOYH3hW6kqHupzTR6rFe2iVctoM1NlyY4hf0wCO9P5O
 L/wAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTAtMTNUMTg6MTI6NTkrMDA6MDAPsjCUAAAAJXRF
 WHRkYXRlOm1vZGlmeQAyMDIxLTEwLTEzVDE4OjEyOjU5KzAwOjAwfu+IKAAAAABJRU5ErkJggg==
X-Now-Playing: Blectum From Blechdom's _DeepBone_: "Pathetic Symphony"
Date: Wed, 13 Oct 2021 20:14:08 +0200
In-Reply-To: <875yu0x256.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 13 Oct 2021 20:31:17 +0300")
Message-ID: <87wnmg3i8f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Juri Linkov <juri@HIDDEN> writes: > 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.
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 17:33:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 13:33:20 2021
Received: from localhost ([127.0.0.1]:33306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mai80-0001fj-Ku
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 13:33:20 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44495)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mai7y-0001f7-FP
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 13:33:19 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id E9AAE1C0002;
 Wed, 13 Oct 2021 17:33:10 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
Organization: LINKOV.NET
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN> <875yu050sz.fsf@HIDDEN>
Date: Wed, 13 Oct 2021 20:31:17 +0300
In-Reply-To: <875yu050sz.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 13 Oct 2021 18:47:40 +0200")
Message-ID: <875yu0x256.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 16:47:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 12:47:51 2021
Received: from localhost ([127.0.0.1]:33224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mahPz-0006f9-Dy
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 12:47:51 -0400
Received: from quimby.gnus.org ([95.216.78.240]:53420)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mahPx-0006ed-V3
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 12:47:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Uprkc4V3kzpbAd9Xy1OtlBp03AIq+fwzx+FKoQArhuU=; b=IOQDSvphkD9zEXlJEXX/Q60pDe
 3bgiFdaCmIJvq3YIS0SoDSTZhKgHDClqJEMhg/RBwDuaCL58g873KjGvIcBirdSmoEDc2mLtu8dPV
 zxJwF8gQthkvM0l9kXVobqkF6S5LLgYeqLkclD/cFyAxjS61dSQCJ29j8CwABLCYM2lc=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mahPp-0001bW-BG; Wed, 13 Oct 2021 18:47:43 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
 <871r4oyjm1.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWXlWNpalDFzrf/
 //+6G1XXAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+UKDRATJQRK
 1kgAAAEDSURBVCjPbdG9boQwDAfwfxCWKqYghb0duvAUQTqWm5wq3ts36XBT99tvaKWKp6zzBQw1
 QsoPJ8GJgRQGw6aBf0A4QOQPTCLzkTlDdQKmHQbUnwHs0xZd1eC8vg00ok0j3ZgbDIww27nCBu8r
 AJEVrqATrZOogCXHNcO5UWIDmV6PsA4F1jtaLgV9WBiMmmGS0Z+gZRc8SQy+og8SVkWXQDehA9+B
 XlCBaLSyBrH6f99gFFzxPn2INOhQM7ZgTadhh4Ikfr6VDRZ9IkpGQkxj1HJC4ApDd3E75GcwDXCv
 jrRqzPl6490feLPYga9PTA3b9sDku9yfdOEkyN3WL78oXdz+AJswgvt/SGGhAAAAWmVYSWZNTQAq
 AAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAAhMA
 AwAAAAEAAQAAAAAAAAAAAEgAAAABAAAASAAAAAEfUvc0AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIx
 LTEwLTEzVDE2OjE5OjM3KzAwOjAwm+S1CQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0xM1Qx
 NjoxOTozNyswMDowMOq5DbUAAAAXdEVYdGV4aWY6WUNiQ3JQb3NpdGlvbmluZwAxrA+AYwAAAABJ
 RU5ErkJggg==
X-Now-Playing: Body =?utf-8?Q?Me=CF=80a's?= _The Work Is Slow_: "Bullitt"
Date: Wed, 13 Oct 2021 18:47:40 +0200
In-Reply-To: <871r4oyjm1.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 13 Oct 2021 19:28:38 +0300")
Message-ID: <875yu050sz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: >> 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. [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 16:35:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 12:35:41 2021
Received: from localhost ([127.0.0.1]:33185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mahED-0006JK-Bk
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 12:35:41 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:44367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mahEA-0006J5-Vv
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 12:35:39 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 234011BF209;
 Wed, 13 Oct 2021 16:35:30 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
Organization: LINKOV.NET
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN> <871r4p6q5n.fsf@HIDDEN>
Date: Wed, 13 Oct 2021 19:28:38 +0300
In-Reply-To: <871r4p6q5n.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 13 Oct 2021 14:54:44 +0200")
Message-ID: <871r4oyjm1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I don't know.  I assume people who use a graphical browser generally
>> have more tabs open than I do (I have an addon in my firefox limiting
>> the number of tabs to 15 by killing LRU tabs), but I don't know how
>> many eww users use eww as their main browser and how many have
>> migrated from graphical browsers to eww.
>
> 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>*.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 12:54:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 08:54:55 2021
Received: from localhost ([127.0.0.1]:58961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1madmZ-00009p-OG
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 08:54:55 -0400
Received: from quimby.gnus.org ([95.216.78.240]:50644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1madmY-00009d-3G
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 08:54:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=izxPx0X6wBZYB1huHTHYCjM33C21fNobQPWmX4m4KJo=; b=pDyWHzPo2UjlxIjAGHqsm+VOJr
 dF4Uq+5Nf1+sJSLuYZfprjDSVTRbYrBF8VfGHlzM2WfeIEziA1JRAnazsWeWftxUVFdDy7wDWOuI+
 5i1aDugm+wQImHr7qAZXBmKaPlc5hhrDmuDdUn4EgTmbAVg34v7mpr7t1Vb3d1yqMmU0=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1madmP-0008LN-BK; Wed, 13 Oct 2021 14:54:47 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
 <87fst53ytg.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEVmtfJ/f423y8+b
 X1lLLzj///8Z8KpJAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UKDQwBC7VU8UAAAAFtSURBVDjLrdNR
 koMgDAZg0B6AQA6g0AMI4QBlyf3PtIFWq6u7MzvT/6Ez8DUkjKrUB6ONVtYPRgNYDQPADBasQC7B
 xjgso+OCGbgiW+ZJ6RTmuICKY3NtgnFzSsEoHUFlExXAHWwBM6rs5oICnA2qOLiI1WT6CvITapHe
 kxTLQfAYp+j9MspRkKJAwckpQFhGKOQE0NkH9qmUU5mtCTWOVUkF2WWc1tsM5/vBFjP4wb8iEKiF
 mWjx78gF5/ZnJK5gnnvzD+DSwa4VQwPnmLkuPgD0g2kFcDk3kLSWmd9AvAPeVVSB3uN4lOO8VvSC
 vE6FlV49glxIBmnQTsp91eBek897kAWXBpYS7oE7gA+eEj17NOAXtFnbxCe4V6JAvo97AEcyXkwb
 uDdIEm2AB6ALuGfZrCsQbbA9pwa8pRwe7e0vKHiC9fU5vlKyNp/8BH//Nk+t18iYl/s3Bj7NphuU
 hI/rCj5X9CBe9/h3vgHNwHGMbot6eAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0xMC0xM1QxMjow
 MToxMSswMDowMKjxcuwAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMTAtMTNUMTI6MDE6MTErMDA6
 MDDZrMpQAAAAAElFTkSuQmCC
X-Now-Playing: Sylvester's _Sylvester-Step II_: "Over And Over"
Date: Wed, 13 Oct 2021 14:54:44 +0200
In-Reply-To: <87fst53ytg.fsf@HIDDEN> (Yuchen Pei's message of "Wed, 13 Oct
 2021 23:15:55 +1100")
Message-ID: <871r4p6q5n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Yuchen Pei <hi@HIDDEN> writes: >> I'm not sure that's
 generally
 useful enough to include -- do people >> use >> `C-u M-x eww' a lot? > >
 I don't know. I assume people who use a graphical browser generally > have
 more tabs open than [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Yuchen Pei <hi@HIDDEN> writes:

>> I'm not sure that's generally useful enough to include -- do people
>> use
>> `C-u M-x eww' a lot?
>
> I don't know.  I assume people who use a graphical browser generally
> have more tabs open than I do (I have an addon in my firefox limiting
> the number of tabs to 15 by killing LRU tabs), but I don't know how
> many eww users use eww as their main browser and how many have
> migrated from graphical browsers to eww.

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.

So the change would be to offer an option that renames the buffer at the
end of...  `eww-display-html', perhaps?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 12:16:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 08:16:12 2021
Received: from localhost ([127.0.0.1]:58865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1madB6-0007ay-9C
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 08:16:12 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1madB1-0007ab-1U
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 08:16:10 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id DDAB65C0145;
 Wed, 13 Oct 2021 08:16:01 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Wed, 13 Oct 2021 08:16:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=
 references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type; s=fm2; bh=2BAbj5k2+kEQYIg7qgaq2JG4QR
 iSPnlNo+pMYMmhWow=; b=guUmDFLnsyngC+d/a3fDI4qDR4f7G6WMkjpuGiOva1
 ZbEqEKDUwghhhu7CaIMr1s5zpQ1S66kzLWD9ZoGpr/iVm5XaHI3EsgZ6ti/M4e+/
 FCZXDpWsH1gfhJ6aNCwl902xvK6jVyFNPt9Zm4IVcxL7OWLi07WCIO7kwHOsNXXJ
 PfEVNKjuu5RUofEswM5xhnCWwIbymwlFw/AW9HSiG+TlRz+QTqRS0NwS8i7AcgKr
 7RzdWCl85ndqNJ4vKjBZD8Qzq8D9VSmOwWb0KsL9jDM/5oCRlzchXbJnVgdRQAHq
 MOYjH3MuHkDF8Y5v4hnt0P6G3/QEKcAf7x5IiWNoBgdA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2BAbj5
 k2+kEQYIg7qgaq2JG4QRiSPnlNo+pMYMmhWow=; b=lBXiTuGxJG3YjRySLywpPf
 92de6AT1ls2LUO1uIiP6TBVDyRLAvc63bVw5soi/xHs1WuOehOvjjkPe4HUUOEW5
 bI4GmWXfRoOYPYr3rwlJgYbJe5lZDFMQZ+4Z2ZqJ5B4BWToyBEGO9JUhy1mTHrO3
 Xo8LP8+magdjIdguQC3i6qkkwkLdmppi4lQxbkaRBUuuSECoNEdPDOXPsCmvRUBy
 clsrztH4jY2zO1Nm7vXH6LRXeV7hku2cRQ/mThobwJv0m2pLi9/anitnImhXiqe8
 Y9aCGSUbYOBQZBquZZOBRzHjYlIK6+mdnMZYB43zkevTGu2DtpveovRl0PouspAA
 ==
X-ME-Sender: <xms:Ac5mYZhQTRe_E_-2Geb9iBeFDuUsgcMdxIDx4QD-AOlnVv8ciQ2Ang>
 <xme:Ac5mYeD8acYZuJ5-Bh-RUNQwRycNc9h910hUIEpfn7QtQ8OS_JjifZ4C1REkeydsM
 LM8TXvjkSZu_afHEA>
X-ME-Received: <xmr:Ac5mYZFDMgpZVqGuVw0_eQCwF8ZriglZ4NlBLlwbXJdIZoV_E5KjuAXHlvTCdp_6iTP6PS_0G5uH2zg1NFb_mk9C_lsovgNijK4G>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddggeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufgjfffkgggtsehgtderredtredtnecuhfhrohhmpegjuhgthhgv
 nhcurfgvihcuoehhiheshihpvghirdhmvgeqnecuggftrfgrthhtvghrnhepkedtfffhle
 eigfehueevieeuueekvdfgveegheeiudeuffdvgfejleeijeevheetnecuffhomhgrihhn
 peihphgvihdrmhgvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhephhhiseihphgvihdrmhgv
X-ME-Proxy: <xmx:Ac5mYeR2qsyWGHtlZgz4sInbmaxM_78qXTWrmYoka3iPUS6zzfzNCg>
 <xmx:Ac5mYWw72dmLhgGkuGO65pPyGJVAZLHrUNuEq84aW-5buUasJiJonw>
 <xmx:Ac5mYU7xV93vPDVgbCbQRjnKdEf1yIohs9w0SJTKv6AvcSVFTdXvjw>
 <xmx:Ac5mYcbhs4P_QGu_ZUXzuLzskOZWMYwA066RYaB1r15RQDC6Anfb3A>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 13 Oct 2021 08:16:00 -0400 (EDT)
References: <87v9214j6g.fsf@HIDDEN> <87lf2x6t11.fsf@HIDDEN>
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
In-reply-to: <87lf2x6t11.fsf@HIDDEN>
Date: Wed, 13 Oct 2021 23:15:55 +1100
Message-ID: <87fst53ytg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Lars Ingebrigtsen <larsi@HIDDEN> writes:

> Yuchen Pei <hi@HIDDEN> writes:
>
>> How about switching to an eww buffer by title?
>
> So the use case is that you have a large number of eww buffers, 
> but you
> want to find a particular based on the title of the web page 
> being
> displayed in that buffer?

Yes.  For me I'm just trying to use eww as my main browser.  For 
that to happen, I'd need to duplicate the tabs functionality in 
firefox, and tabs are identified by titles.

>
> I'm not sure that's generally useful enough to include -- do 
> people use
> `C-u M-x eww' a lot?

I don't know.  I assume people who use a graphical browser 
generally have more tabs open than I do (I have an addon in my 
firefox limiting the number of tabs to 15 by killing LRU tabs), 
but I don't know how many eww users use eww as their main browser 
and how many have migrated from graphical browsers to eww.

BTW I have a few functions with keybindings spawning new eww 
buffers in my init file.

>
> There may also be several buffers with the same title, I guess, 
> in which
> case this wouldn't allow you to choose either?

I think with icomplete it will show all of them in the minibuffer 
and you can choose (you can't tell which one is which though, same 
as graphical browser tabs).  But I haven't tested it without 
icomplete - will do.

-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYWbN+wscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0KwUAPwKOYS3JfMDQ/0XQ2XrBZnSlZYygTKoYbiFs/ks7LoU
2QD+N6YqKZBSSYcWoZ7EM6dUOsudbSEi5mvPIanV+qt/VAg=
=M0Nl
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at 51176 <at> debbugs.gnu.org:


Received: (at 51176) by debbugs.gnu.org; 13 Oct 2021 11:52:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 07:52:53 2021
Received: from localhost ([127.0.0.1]:58701 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1macoW-0006uN-Ux
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 07:52:53 -0400
Received: from quimby.gnus.org ([95.216.78.240]:49838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1macoV-0006uB-6a
 for 51176 <at> debbugs.gnu.org; Wed, 13 Oct 2021 07:52:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=WVJjDbZerg/+Dv4ZPWaQmQbYOZ4RHJHL3JslINi4oCs=; b=h/vKFfgqS510/N73+UfJbUwVeG
 oKWjYNMGK3pnUGsc4FAxkGELXEtIbVmfufScOMYc/OKkV5n5uaaBQ7mm55dLJrfjGcSdZn0JzN8TG
 zZQj7m4O23BIFXZYOvNuFvAanUlAY+B36TjtLL3+rdFeGKCaNU/i3YJFZOo6rNYbdh8M=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1macoM-0007qI-Hp; Wed, 13 Oct 2021 13:52:44 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuchen Pei <hi@HIDDEN>
Subject: Re: bug#51176: eww switch buffer by title
References: <87v9214j6g.fsf@HIDDEN>
X-Now-Playing: Sylvester's _Sylvester-Step II_: "Just You And Me Forever"
Date: Wed, 13 Oct 2021 13:52:42 +0200
In-Reply-To: <87v9214j6g.fsf@HIDDEN> (Yuchen Pei's message of "Wed, 13 Oct
 2021 15:56:07 +1100")
Message-ID: <87lf2x6t11.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Yuchen Pei <hi@HIDDEN> writes: > How about switching to an
 eww buffer by title? So the use case is that you have a large number of eww
 buffers, but you want to find a particular based on the title of the web
 page being displayed in that buffer? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 51176
Cc: 51176 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Yuchen Pei <hi@HIDDEN> writes:

> How about switching to an eww buffer by title?

So the use case is that you have a large number of eww buffers, but you
want to find a particular based on the title of the web page being
displayed in that buffer?

I'm not sure that's generally useful enough to include -- do people use
`C-u M-x eww' a lot?

Some code comments:

> (defun eww-switch-by-title (title-and-buffer)
>  "Switches to an eww buffer with selected title."
>  (interactive
>   (list
>    (let ((com-table))
>      (dolist (buffer (buffer-list))
> 	(with-current-buffer buffer
> 	  (when (equal major-mode 'eww-mode)
> 	    (add-to-list
> 	     'com-table

Use `push'.

> 	     (concat (plist-get eww-data :title)
> 		     (propertize (concat " " (buffer-name))
> 				 'invisible t))))))
>      (completing-read "Eww buffer title: " com-table))))

Use an alist instead of propertising a string.

There may also be several buffers with the same title, I guess, in which
case this wouldn't allow you to choose either?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Oct 2021 04:56:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 13 00:56:19 2021
Received: from localhost ([127.0.0.1]:57303 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1maWJP-0003cV-5L
	for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 00:56:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:33190)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hi@HIDDEN>) id 1maWJM-0003cK-2D
 for submit <at> debbugs.gnu.org; Wed, 13 Oct 2021 00:56:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46718)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hi@HIDDEN>) id 1maWJL-0001R1-Bb
 for bug-gnu-emacs@HIDDEN; Wed, 13 Oct 2021 00:56:15 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:44237)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hi@HIDDEN>) id 1maWJJ-0000F2-Dc
 for bug-gnu-emacs@HIDDEN; Wed, 13 Oct 2021 00:56:15 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.nyi.internal (Postfix) with ESMTP id 046E25C00CC
 for <bug-gnu-emacs@HIDDEN>; Wed, 13 Oct 2021 00:56:12 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Wed, 13 Oct 2021 00:56:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=from
 :to:subject:date:message-id:mime-version:content-type; s=fm2;
 bh=xYY2HaqqcZokpJfVJTG4mNIuEB+uRY261j7w4Exqu/s=; b=Kw/5IEtNdq6X
 aFqpLDR+PhcXIFX7yvHhaRPbc35aHsLCpLimv4CXp43iNfKW4iFT9TcgEn2vV7fg
 mTDzNFQLbMFGKFK2sgONi1CIDBJbPhYymCWRdSP7q/l9BXAPg+haI5F2AuteY63f
 uSWXVab6WxBXgDdPhatmRmPKBXPv1RSt/w3cxA0kuEkSSB4UPezuYte4EI2QIEUV
 fdg35HV/7mpfpj28KF/9QBZNi13obmVAnBtSXudkHz9QhpjoaSW/mcSSlQUNjySf
 mt1ePA59upjHg7jKkPYbkqFBVuDumIQ5nqagY39/LF/CdYM7NytkEmU3wRAzdk1q
 x+Ju05yMFg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; bh=xYY2HaqqcZokpJfVJTG4mNIuEB+uR
 Y261j7w4Exqu/s=; b=IpMGbH/hiOIeBhBaRjrdP8XCd+SOJE4Zb4bof7nEiOQiU
 /0KAExRp5wxnf0Vt+k288RIHAUBXWcSvx9kTU+QZW/5GbmZV4a7ygM9k2lyUTBq7
 NIZJ+hbhH94jtygNURo6Agb++xE9UUcwHuzy6pVwRIn4HdAiqhRASNQPP94P2ScR
 r+QoUoxULV+ER1+mtI+ZuQM8HubKZTJx/J7FtSf+/R1uvnOkqmP1xfQwLHy1uXli
 05OO5vcf+utBJ0h6Z/oXyiOenzIM0wgWs/0f2lgHrJbhHLwCLyY9xYMh6lgL3ws4
 fZGXbhO+ebmm+eAIx6IDRoDy91YTdfBNGGBdThhig==
X-ME-Sender: <xms:62ZmYT8hnpMyFGPnM-zT7Zhyt5aAYhlOrihhj1aToLr8ENrucANThQ>
 <xme:62ZmYfvdPHwdFACIflXFnNhuAV_2ZiByIcA1PyUb1nbAMoSglyV6mp37CHgAO2sbM
 NsJbml32kkGSKTk-Q>
X-ME-Received: <xmr:62ZmYRBeHtoGk1BHrDq7dzgsFY270uf-LZxIniYausr_reBNF8N3sW12CLfqnMKbPBpV7DaWMkhKC0W9DnEJxUA96gjJCu9lphoa>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtledgkeeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesghdtreertd
 ertdenucfhrhhomhepjghutghhvghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucgg
 tffrrghtthgvrhhnpeduueevvddutdetieelledvffeiudetieevjedtteekhedtgfegge
 ejueduuefffeenucffohhmrghinhephihpvghirdhmvgenucevlhhushhtvghrufhiiigv
 pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghirdhmvg
X-ME-Proxy: <xmx:62ZmYffYEwM-5vVRQk6hP7bafjO17msw9LF1BdnFEyWmh2Xd4OEeyA>
 <xmx:62ZmYYMPWZZ3QoLl4zZySIA3GwMIXZJAyCe_d1J6kcBFC5hotwuq_A>
 <xmx:62ZmYRnphW-nY-Q1uGRG2cb4eEWXJ7RWzJdD6RiAuhllwPvxuCpAzA>
 <xmx:7GZmYTa1wjuvSoNzM-Zx2sKnqaG90nmbDlIE5_z-AmOuZDQZ2QyMjw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Wed, 13 Oct 2021 00:56:10 -0400 (EDT)
User-agent: mu4e 1.4.13; emacs 27.2
From: Yuchen Pei <hi@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Subject: eww switch buffer by title
Date: Wed, 13 Oct 2021 15:56:07 +1100
Message-ID: <87v9214j6g.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
Received-SPF: pass client-ip=66.111.4.27; envelope-from=hi@HIDDEN;
 helo=out3-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: text/plain; format=flowed

Hello,

How about switching to an eww buffer by title?

I have a hacky way to do it (see below).  I'll be happy to prepare 
a patch if people think this is a sensible feature to add.

(defun eww-switch-by-title (title-and-buffer)
  "Switches to an eww buffer with selected title."
  (interactive
   (list
    (let ((com-table))
      (dolist (buffer (buffer-list))
	(with-current-buffer buffer
	  (when (equal major-mode 'eww-mode)
	    (add-to-list
	     'com-table
	     (concat (plist-get eww-data :title)
		     (propertize (concat " " (buffer-name))
				 'invisible t))))))
      (completing-read "Eww buffer title: " com-table))))
  (string-match "^.* \\(.*\\)$" title-and-buffer)
  (switch-to-buffer (match-string 1 title-and-buffer)))


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
           <https://ypei.me/assets/ypei-pubkey.txt>

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYWZm5wscaGlAeXBlaS5t
ZQAKCRAhJn6T74bf0JwDAQD7u9EylFWIqwiBLnksyf7SUKpuccAFc7xfiAvF9GWO
AAEAoGN3qNp76ZMIYzpEOYyum6S5Lr0JAB8uyECjwIJPDgI=
=47b7
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Yuchen Pei <hi@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#51176; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 15 Oct 2021 12:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.