Last Updated: July 19, 2020
·
716
· ddeaguiar

Emacs Killing Buffers

Since I started using emacs I found the need to clean up my open buffer list periodically. The [EmacsWiki][http://emacswiki.org/emacs/KillingBuffers] has a great writeup on the many options available for doing this. For now, this simple solution from the above-mentioned-source suites me just fine.

(defun kill-other-buffers ()
  "Kill all other buffers."
  (interactive)
  (mapc 'kill-buffer (delq (current-buffer) (buffer-list))))