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
Post by Matthew HuggettHello 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