1
I often leave Emacs (actually Aquamacs) open and wind up with a lot of buffers cluttering up my auto-complete. I would like to be able to close them all and start fresh. Right now I quit and reopen Emacs but that feels wrong.
Is there a way to close all buffers in Emacs?
This is Emacs 24.4 / Aquamacs 3.2.
(defun close-all-buffers () (interactive) (mapc 'kill-buffer (buffer-list)))
-- http://stackoverflow.com/a/3417472/2112489 – lawlist – 2015-03-30T22:04:41.807@lawlist Thanks! You should post that as an answer here so it's available under the right question title to be found by others. – Schwern – 2015-03-31T00:23:19.650
1You may also check
clean-buffer-list
, which will close all buffers that have been unused for some time. – Juancho – 2015-03-31T14:07:40.870