I just recently started using Helm and I like it so far. But one annoying thing I encountered was the fact that if I don't complete an action, I end up with a totally useless buffer. And these things just keep adding up.

I know I should not care about the remaining buffers, and just use helm- functions, but somehow I find myself thinking I have to kill them.

One solution is to automatize: list-buffers / ibuffer, mark all by mode or by regex and delete them, but I'm looking for something more like popwin. How could I do this?

  • 1
    I'm not sure deleting them is a good idea, considering you can do M-x helm-resume to continue where you've left off (which is tremendously useful if you for example use M-x helm-do-grep and follow an interesting match, then resume your helm session to look at the other matches).
    – wasamasa
    Commented Sep 29, 2014 at 14:33
  • 1
    In general with Emacs it's a good idea to ignore special buffers rather than killing them. There are tons of special buffers that come up in various situations (especially when background processes are involved). They're useful for debugging, but you can ignore them otherwise.
    – shosti
    Commented Sep 29, 2014 at 15:38
  • Hmmm, it seems like I gotta change some of my bad habbits and do things more emacsy.
    – caisah
    Commented Sep 29, 2014 at 16:04

2 Answers 2


I use popwin and helm with the following and I think that's all that's needed to get your desired behaviour (I'm not sure where I found it). I use it not so much for the buffer clutter, which I hadn't actually noticed till now, but for keeping the window arrangement.

(require 'popwin)
(popwin-mode 1)
(setq display-buffer-function 'popwin:display-buffer)
(push '("^\*helm .+\*$" :regexp t) popwin:special-display-config)
(push '("^\*helm-.+\*$" :regexp t) popwin:special-display-config)
  • The third line seems to break how buffers are displayed in Emacs. I got two copies of newly created buffers in two windows. Commented Jul 12, 2018 at 2:39
  • Sorry, I've subsequently moved to Spacemacs so not sure how to fix it. Commented Jul 13, 2018 at 9:59
  • I added this script but it didn't do anything, should I do additional stuff?
    – alper
    Commented May 4, 2020 at 14:09
  • @alper, you may want to start a new question detailing more of your config and what else happens (errors, etc.). This is mostly just standard popwin so checking out their documentation might help. Commented May 6, 2020 at 7:59

Regardless of whether it's a good idea or not, you might find tempbuf.el useful. A possibility would be to install it into so helm hook, and adjust the expiration delay to your taste. From there, buffers will start disappearing automatically when they're deemed unneeded.

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.