Automatically kill geiser buffer and window
I wanted to make an advice that will kill geiser REPL window in case I've exited one, much like I do for terminal:
(defun autokill-when-no-processes (&rest args) "Kill buffer and its window automatically when there's no processes left." (when (null (get-buffer-process (current-buffer))) (kill-buffer (current-buffer)) (delete-window)))
So I've decided to add advice to the
geiser-repl-exit function like so:
(advice-add 'geiser-repl-exit :after #'autokill-when-no-processes)
However this doesn't work. It seems that process remain actice for a cetrtain time after
geiser-repl-exit executed. Is there a proper way to do this?