1

Often times, when I'm done a task, I'd like to close out of all buffers I was using for it. However, I usually don't, because I think it'd be a pain.

What I'd like is to be able to kill all buffers spawned from a particular one -- usually, when I begin a task, there is a buffer I open first, and I'd like to be able to kill all buffers spawned from that one -- all buffers opened with C-x C-f or whatever while I was initially in that buffer, or recursively. Does this exist?

  • I think the question is unclear and you'll need to describe just what you're doing, e.g. by giving a step-by-step recipe to reproduce the behavior/context, starting from emacs -Q (no init file). There is no generic notion/behavior of buffers spawning buffers. We cannot guess what "tasks" you might be performing. – Drew Mar 29 at 2:00
  • @Drew OK, well I guess you mostly answered what I was wondering. I was just wondering if there was some simple information stored somewhere (for all buffers) about a parent. I guessed that this was not the case. – extremeaxe5 Mar 29 at 3:35
  • It still might help if you describe more what you are doing. It's possible that someone here might be able to help. Sometimes a clearer description can turn on the light. – Drew Mar 29 at 4:30
  • 1
    Your question seems pretty clear to me, BTW, so let me try at an answer: there are four functions in Emacs that create buffers, but, as @Tyler points out, none of them save the "parent buffer" as a state of the created buffer. However, using Ibuffer, you can create groups based on buffer name or major-mode (Gnus-style) or even version control status, path, or parent directory, which you can then select and destroy all at once. – Dmitri Mar 30 at 0:25
  • 1
    Check out this question for more ideas. – Dmitri Mar 30 at 0:27

Browse other questions tagged or ask your own question.