From: Lars Ingebrigtsen <larsi@gnus.org>
To: Yuchen Pei <hi@ypei.me>
Cc: 51176@debbugs.gnu.org
Subject: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 13:52:42 +0200 [thread overview]
Message-ID: <87lf2x6t11.fsf@gnus.org> (raw)
In-Reply-To: <87v9214j6g.fsf@ypei.me> (Yuchen Pei's message of "Wed, 13 Oct 2021 15:56:07 +1100")
Yuchen Pei <hi@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
next prev parent reply other threads:[~2021-10-13 11:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 4:56 bug#51176: eww switch buffer by title Yuchen Pei
2021-10-13 11:52 ` Lars Ingebrigtsen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lf2x6t11.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=51176@debbugs.gnu.org \
--cc=hi@ypei.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).