From: Matthew Huggett <mhuggett@zam.att.ne.jp>
Cc: help-gnu-emacs@gnu.org
Subject: Re: kill buffers according to regex
Date: Tue, 18 Jan 2005 13:54:57 +0900 (JST) [thread overview]
Message-ID: <20050118045457.8D5161978E0@smtp2.att.ne.jp> (raw)
In-Reply-To: <87u0pfzvpb.fsf@telia.com> (message from Henrik Enberg on Mon, 17 Jan 2005 20:45:04 +0100)
> From: Henrik Enberg <henrik.enberg@telia.com>
> Newsgroups: gnu.emacs.help
> Date: Mon, 17 Jan 2005 20:45:04 +0100
> Organization: Le Petomane Appreciation Society
> Content-Type: text/plain; charset=us-ascii
> X-Now-Playing: Raphael Saadiq - People (feat. Randy Wiggins)
> Cancel-Lock: sha1:YUenTuCzvhgTBBft1K7Cymf+e6k=
> Xref: shelby.stanford.edu gnu.emacs.help:127947
> Sender: help-gnu-emacs-bounces+mhuggett=zam.att.ne.jp@gnu.org
>
> Matthew Huggett <mhuggett@zam.att.ne.jp> writes:
>
> > Hello all,
> >
> > Is there any built-in command to kill all buffers that match a
> > regex?
>
> (defun kill-buffers-matching (regexp)
> (interactive "sKill buffers matching: ") (dolist (i
> (buffer-list))
> (when (string-match regexp (buffer-name i))
> (kill-buffer i))))
Thank you very much for this Henrik. I figured I'd have to use
buffer-list but wasn't sure of how to go about it.
Anyway, while I'm writing, as an Emacs/Elisp novice, I find this list
to be quite a friendly, helpful place, so thanks to all you more
experienced users for sharing your knowledge.
Regards,
Matthew
next prev parent reply other threads:[~2005-01-18 4:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.13610.1105947021.27204.help-gnu-emacs@gnu.org>
2005-01-17 19:13 ` kill buffers according to regex drkm
2005-01-18 4:07 ` Matthew Huggett
[not found] ` <mailman.13806.1106023018.27204.help-gnu-emacs@gnu.org>
2005-01-18 16:06 ` Kevin Rodgers
2005-01-18 16:32 ` Drew Adams
2005-01-18 17:41 ` drkm
2005-01-17 19:45 ` Henrik Enberg
2005-01-18 4:54 ` Matthew Huggett [this message]
2005-01-18 18:16 ` Enila Nero
2005-01-17 7:15 Matthew Huggett
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050118045457.8D5161978E0@smtp2.att.ne.jp \
--to=mhuggett@zam.att.ne.jp \
--cc=help-gnu-emacs@gnu.org \
/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 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.