org-noter
org-noter copied to clipboard
feature request: kill pdf and note buffer on session quit
Would be nice if on q
, it automatically closes both: pdf and notes buffer (with a prompt if unsaved)
As a workaround for myself I did this:As a workaround I did this:
(defun org-noter-kill-the-note-buffer (&rest _ignore)
(setq notes-fname (org-noter--session-notes-file-path org-noter--session))
(setq pdf-fname (buffer-file-name (org-noter--session-doc-buffer org-noter--session)))
(run-at-time "0.5 sec" nil (lambda ()
(kill-buffer (get-file-buffer pdf-fname))
(switch-to-buffer (get-file-buffer notes-fname))
(kill-buffer-ask (get-file-buffer notes-fname))
(makunbound 'notes-fname)
(makunbound 'pdf-fname))))
(advice-add #'org-noter-kill-session :before 'org-noter-kill-the-note-buffer)
It's a bit messy, but works for me
+1 for the request to kill the PDF buffer. However I’d appreciate an option to keep the notes buffer.
Even I may use the option to kill the PDF buffer! Will add this to my todo list, thanks!