Bad-ptr / persp-mode.el

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

`C-x k' kills buffer still present in other perspectives #79

Closed mz-pdm closed 6 years ago

mz-pdm commented 6 years ago

When a buffer is present in more than one perspective and I kill it with `C-x k', it's really killed rather than just removed from the current perspective.

How to reproduce:

I think the problem is in persp-kill-buffer-query-function, `not-foreign' branch:

(if (persp-buffer-in-other-p* buffer persp)
    (persp--remove-buffer-2 persp buffer)

persp--remove-buffer-2, and thus persp-kill-buffer-query-function, returns the buffer rather than nil so the buffer gets actually killed. If I change the code above to

(if (persp-buffer-in-other-p* buffer persp)
    (progn
      (persp--remove-buffer-2 persp buffer)
      nil)

then killing buffers works as expected.

Bad-ptr commented 6 years ago

You are correct. Thanks!

Bad-ptr commented 6 years ago

Must be fixed 8d397d2c8d09db6b8a000c1d76df81ce5ea9963a

mz-pdm commented 6 years ago

Thanks for quick fix!