Closed namdnguyen closed 5 years ago
Please read suggested-configuration for information about the persp-autokill-buffer-on-remove
variable.
Ah, I didn't see that in the README. Thank you! I'll take a look!
Changing the value for the variable persp-autokill-buffer-on-remove
did it for me. It was set to nil
, and I changed it to t
. The other option is kill-weak
, which kills buffers from weak perspectives only. I'm not quite sure what constitutes a weak perspective. Does it refer to the 'nil' perspective that contains all buffers across all perspectives? Can you have more than one non-weak perspective? If so, how would you create that, in contrast to creating a regular, weak perspective?
Let me see if I understand the the difference between setting persp-autokill-buffer-on-remove
to nil
or kill-weak
. Let's say you have a buffer that exists on 2 different, weak perspectives, and on the 'nil' perspective, by default.
(setq persp-autokill-buffer-on-remove nil)
, if you kill one of the weak perspectives, then the buffer will remain in the remaining weak perspective and in the 'nil' perspective. (setq persp-autokill-buffer-on-remove kill-weak)
, if you kill one of the weak perspectives, then the buffer will be removed from the remaining weak perspective, but still exist in the 'nil' perspective. (setq persp-autokill-buffer-on-remove t)
, killing one of the weak perspectives kills the buffer across all (3 in this case) perspectives.Finally, if persp-kill
(keybound to C) is ran with the universal argument, then it's effectively killing the perspective with persp-autokill-buffer-on-remove
temporarily set to nil
. If persp-autokill-buffer-on-remove
is already set to nil
, then calling persp-kill
is identical to calling it with the universal argument. Is this correct?
Is there a way to kill all buffers when killing a perspective with
persp-kill
? Looking at thepersp-kill
function, the default behavior says that it will kill the perspective and all of the buffers added to the killed perspective, unless it's called with a universal argument. If called with the universal argument, it sets the optional variable,dont-kill-buffers
, and it doesn't kill all buffers in a perspective.However, when it's killing buffers, it's actually using
persp-remove-buffer
, which means that it's removed from the killed perspective, but they persist on other perspectives where it's added. This behavior is consistent with what you would expect by callingpersp-kill
with the universal argument. My expectation for callingpersp-kill
normally is that it would usepersp-kill-buffer
on all of the buffers in a perspective to truly kill the buffer.Is there a reason, the buffers are removed, rather than killed, as the prompts and messages suggest?