Bad-ptr / persp-mode.el

named perspectives(set of buffers/window configs) for emacs
401 stars 44 forks source link

Unrelated buffers killed on find-alternate-file #42

Closed mz-pdm closed 8 years ago

mz-pdm commented 8 years ago

When I run C-x C-v (find-alternate-file), unrelated buffers may be killed by side effect. When inspecting it I've found out that the problem disappears when I remove persp-kill-buffer-h from kill-buffer-hook. It seems that persp-kill-buffer-h switches buffers in the middle of find-alternate-file and then another buffer, in addition to the current one, gets killed during the operation. It's possible to watch the bug in action by switching to some perspective, instrumenting find-alternate-file for debugging and running C-x C-v. In the debugger, step until you reach (run-hooks 'kill-buffer-hook) line in find-alternate-file and observe that the current buffer gets switched after evaluating the line.

Bad-ptr commented 8 years ago

Confirmed.

Bad-ptr commented 8 years ago

Seems like fixed 05b53251fefad5a0ab1deda4d9613b656a9e583b.

mz-pdm commented 8 years ago

At the first glance, it seems to fix the bug. Thanks!