When I press C-x s
(save-some-buffers
) or C-x C-c
(save-buffers-kill-terminal
), Emacs displays the names of modified buffers one by one and asks what to do with each (save, diff, pass, ...). Pressing y
one by one is slow. Pressing !
doesn't let you see what buffers are being saved.
How can I have the names of all modified buffers displayed first so that I can mark off some of them and save all the other quickly?
C-x C-b
(M-x list-buffers
) displays a list of all the buffers. Modified ones will be shown with a *
next to them. You can mark a buffer for saving by pressing s
. When you're done, press x
to save all the buffers you marked.
Unfortunately, as far as I know, there's no way to show only the unsaved buffers or to sort them so they're all at the top.
(I actually prefer M-x ibuffer
to M-x list-buffers
, but ibuffer
provides a similar feature.)
In emacs 23, with ibuffer :
Strangely enough, *u does not mark 'special' buffers like scratch, compilation, etc... I suppose i regexps on the name ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With