all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#51176: eww switch buffer by title
@ 2021-10-13  4:56 Yuchen Pei
  2021-10-13 11:52 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 29+ messages in thread
From: Yuchen Pei @ 2021-10-13  4:56 UTC (permalink / raw)
  To: 51176

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

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>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 243 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-10-18  7:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-13  4:56 bug#51176: eww switch buffer by title Yuchen Pei
2021-10-13 11:52 ` Lars Ingebrigtsen
2021-10-13 12:15   ` Yuchen Pei
2021-10-13 12:54     ` Lars Ingebrigtsen
2021-10-13 16:28       ` Juri Linkov
2021-10-13 16:47         ` Lars Ingebrigtsen
2021-10-13 17:31           ` Juri Linkov
2021-10-13 18:14             ` Lars Ingebrigtsen
2021-10-13 20:31               ` Protesilaos Stavrou
2021-10-13 20:33                 ` Lars Ingebrigtsen
2021-10-15  6:31                   ` Protesilaos Stavrou
2021-10-15  8:32                     ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-15 10:35                     ` Lars Ingebrigtsen
2021-10-15 11:22                       ` Protesilaos Stavrou
2021-10-15 12:13                         ` Lars Ingebrigtsen
2021-10-15 13:25                           ` Jose Antonio Ortega Ruiz
2021-10-15 14:00                             ` Lars Ingebrigtsen
2021-10-15 19:59                               ` Jose Antonio Ortega Ruiz
2021-10-16  4:16                                 ` Protesilaos Stavrou
2021-10-16  4:20                                   ` Protesilaos Stavrou
2021-10-16 14:31                                   ` Jose Antonio Ortega Ruiz
2021-10-18  6:43                                   ` Lars Ingebrigtsen
2021-10-18  7:15                                     ` Protesilaos Stavrou
2021-10-18  7:16                                       ` Lars Ingebrigtsen
2021-10-13 21:26                 ` Yuchen Pei
2021-10-14  0:16                 ` bug#51176: [External] : " Drew Adams
2021-10-13 23:48             ` Yuchen Pei
2021-10-14 11:06               ` Lars Ingebrigtsen
2021-10-14 16:05               ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.