File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 33; ;; Code:
44
55(use-package projectile
6+ :ensure nil
67 :diminish projectile-mode
78 :bind-keymap
89 (" C-c p" . projectile-command-map)
1314 (add-hook 'prog-mode-hook #' (lambda () (projectile-mode +1 )))
1415 )
1516
17+ (use-package compile
18+ :ensure nil
19+ :config
20+ ; ; Switch to previous buffer when compilation is successful
21+ ; ; https://stackoverflow.com/a/11059012/11579038
22+ (defun rb-bury-compile-buffer-if-successful (buffer string )
23+ " Bury a compilation buffer if succeeded without warnings."
24+ (when (and
25+ (buffer-live-p buffer)
26+ (string-match " compilation" (buffer-name buffer))
27+ (string-match " finished" string)
28+ )
29+ (run-with-timer 1 nil
30+ (lambda (buf )
31+ (bury-buffer buf)
32+ (switch-to-prev-buffer (get-buffer-window buf) 'kill )
33+ ; ; delete window if it was opened by the compilation process
34+ ; ; (have two windows with the same buffer)
35+ (when
36+ (and (equal 2 (length (window-list )))
37+ (eq (window-buffer (car (window-list ))) (window-buffer (cadr (window-list )))))
38+ (delete-window (selected-window ))
39+ )
40+ )
41+ buffer)))
42+ (add-hook 'compilation-finish-functions 'rb-bury-compile-buffer-if-successful ))
1643
1744(provide 'init-project )
1845
Original file line number Diff line number Diff line change 1010 ; ; maybe configure LaTeX-indent-environment-list (removed)
1111 )
1212
13+ (use-package auctex
14+ :ensure (:source " MELPA" ))
15+
1316
1417(provide 'init-tex )
1518
You can’t perform that action at this time.
0 commit comments