In Emacs - how do I kill buffers matching regexp?
Edit:
How do I answer y
automatically (kill-matching-buffers
ask
For Emacs version >=24, the kmb.el library from ELPA repository
does exactly that with the command kmb-kill-matching-buffers-no-ask
.
It also provides the command kmb-delete-process-and-kill-buffer-no-ask
,
which kills the current buffer (without confirmation).
I bind the latter command as follows:
(global-set-key (kbd "H-M-") 'kmb-delete-process-and-kill-buffer-no-ask)
so that i don't call it accidentaly, just when i need it.