Open codetrick opened 4 years ago
This workaround works perfectly!
Why not add a PR with the change @codetrick ?
If it's OK with you @codetrick I will open the PR myself.
PR #137.
i am having the same issue and it pretty annoying. please merge this :)
emacs version: 27.1 org-noter version: 20191020.1212
When there are more than one frames open, and the frame where the org-noter buffers are in has no non-noter window, then killing the
org-noter
session will also kill the frame, even whenorg-noter-kill-frame-at-session-end
is set tonil
.The reason this happens seems to be that the
org-noter
document buffer is in a dedicated window. Emacs'skill-buffer
callsreplace-buffer-in-windows
after the buffer is killed. This function checks if the window is dedicated. If the window is dedicated and is the only window in the frame, then the window will be deleted. The frame will be deleted too if there are other frames open. This explains the behavior observed above.The solution is to add the following in the function
org-noter-kill-session
before(kill-buffer doc-buffer)
:(if (not org-noter-kill-frame-at-session-end) (set-window-dedicated-p (get-buffer-window doc-buffer) nil))