meowking's Blog

meowking's Avatar Image
A Linux and Emacs enthusiast who loves anime and cats.

My Chinese gossip account: https://wxw.moe/@meow_king (talking nonsense
BG Image: https://wallhaven.cc/w/p93dx3
← All posts

#Emacs A simple configuration to hide compilation buffer when compile start, and switch to that buffer when compilation finished.

;; compilation
(add-to-list 'display-buffer-alist
	'("\\*compilation\\*"
     (display-buffer-no-window)))

(defun mk/switch-buffer-when-compilation-finished (compilation-buffer _msg)
  (switch-to-buffer compilation-buffer))

(add-hook 'compilation-finish-functions #'mk/switch-buffer-when-compilation-finished)
To like or reply, open original post on Emacs.ch