Emacs 26.1. ido, smex

If I want to kill one buffer I use command C-x k

Here result: enter image description here

As result I can kill ONE desire buffer. But suppose I need to kill the next buffers:

build.gradle, approfile.json, cascade.update.txt

How I can do this quickly?

  • 1
    In ido, you can kill buffers from ido-switch-buffer (C-x b) by typing C-k while you have the desired buffer as the suggestion.
    – user12563
    Commented Nov 3, 2018 at 17:15
  • It's very slow. I need by arrow to go to desire buffer and type C-k. What about if I need to delete 20 buffers with name suffix *.txt? Commented Nov 4, 2018 at 8:29
  • 1
    You can narrow by typing the name of the buffer you want to switch to.
    – user12563
    Commented Nov 4, 2018 at 14:51

2 Answers 2


ido isn't designed for that; use the buffer list instead. C-x C-b opens a buffer containing a list of all buffers that are open. In this buffer you can use C-k to mark buffers to be deleted, then x to delete all marked buffers. Since it's a full buffer, you can also use C-s to search it.

  • 1
    I'd suggest using ibuffer for that, as it allows to mark buffers like you'd do in dired, for instance by their file names or modes.
    – user12563
    Commented Nov 4, 2018 at 14:50

Another option which I find really handy is M-x kill-some-buffers. Really nice option no need for split screens or anything like that it uses the mini buffer keeping things tight, meaning that after the command is executed you won’t have to C-x o C-x k the remaining open buffer of ibuffer or the listed buffers C-x C-b

  • It's ask me for every buffer. Smt like: Buffer "xxxx" is unmodified, Kill ? . So this is not what i need. Commented Oct 11, 2019 at 11:36
  • Ok, its definitely up to your choice but you can silence that y/n predicate if you want. Also, if you already found some other solutions working better for you then there's no need to look at something else. Cheers!
    – Kirk Walla
    Commented Oct 11, 2019 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.