From 5fad0abd1764223e228e0dbe7e0e2e5d7e4c1c7d Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Wed, 24 May 2017 19:18:06 +0200 Subject: [PATCH] =?UTF-8?q?shell-pop=20und=20bessere=20L=C3=B6sung=20f?= =?UTF-8?q?=C3=BCr=20compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emacs/.emacs | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/emacs/.emacs b/emacs/.emacs index e21dc5a..6f9a46a 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -216,26 +216,26 @@ (setq compilation-scroll-output 'first-error) (setq compilation-window-height 10) -(defun my/compilation-bury-buffer-without-error (buffer string) - (cond ((string-match "finished" string) - (message "Build maybe successful: closing window.") - (run-with-timer 3 nil - 'delete-window - (get-buffer-window buffer t))) - (t (message "Compilation exited abnormaly: %s" string)))) - -(setq compilation-finish-function 'my/compilation-bury-buffer-without-error) +;(defun my/compilation-bury-buffer-without-error (buffer string) +; (cond ((string-match "finished" string) +; (message "Build maybe successful: closing window.") +; (run-with-timer 3 nil +; 'delete-window +; (get-buffer-window buffer t))) +; (t (message "Compilation exited abnormaly: %s" string)))) +; +;(setq compilation-finish-function 'my/compilation-bury-buffer-without-error) -(defun my/setup-compilation-window () - (when (not (get-buffer-window "*compilation*")) - (save-selected-window - (save-excursion - (let* ((w (split-window-vertically)) - (h (window-height w))) - (select-window w) - (switch-to-buffer "*compilation*") - (shrink-window (- h compilation-window-height))))))) -(add-hook 'compilation-mode-hook 'my/setup-compilation-window) +;(defun my/setup-compilation-window () +; (when (not (get-buffer-window "*compilation*")) +; (save-selected-window +; (save-excursion +; (let* ((w (split-window-vertically)) +; (h (window-height w))) +; (select-window w) +; (switch-to-buffer "*compilation*") +; (shrink-window (- h compilation-window-height))))))) +;(add-hook 'compilation-mode-hook 'my/setup-compilation-window) ;; Window movement ; Old keys @@ -291,6 +291,8 @@ '("*Apropos*" display-buffer-same-window)) (add-to-list 'display-buffer-alist '("*Help*" display-buffer-in-side-window)) +(add-to-list 'display-buffer-alist + '("*compilation*" (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (size . 0.2))) ;; Change all prompts to y or n (fset 'yes-or-no-p 'y-or-n-p)