3

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 Sep 29 '14 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 Sep 29 '14 at 15:38
  • Hmmm, it seems like I gotta change some of my bad habbits and do things more emacsy. – caisah Sep 29 '14 at 16:04
5

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. – Compro Prasad Jul 12 '18 at 2:39
  • Sorry, I've subsequently moved to Spacemacs so not sure how to fix it. – Donavan Costaras Jul 13 '18 at 9:59
2

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, privacy policy and cookie policy

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