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

Previous Next

Package: emacs;

Reported by: Yuchen Pei <hi <at> ypei.me>

Date: Wed, 13 Oct 2021 04:57:02 UTC

Severity: normal

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 51176 <at> debbugs.gnu.org
Subject: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 13:52:42 +0200
Yuchen Pei <hi <at> ypei.me> 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




This bug report was last modified 3 years and 309 days ago.

Previous Next


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