diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-06-13 00:57:28 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-06-13 00:57:28 +0100 |
commit | bab2d5d01955fb8c4f4d2ab65e3ad196c5a61815 (patch) | |
tree | 07ccc4b362ee194e804850bcec9d0221e752880f /Emacs/.config/emacs/config.org | |
parent | c49d6b0235aef9fe859f473cd760275cfcdccf87 (diff) | |
download | dotfiles-bab2d5d01955fb8c4f4d2ab65e3ad196c5a61815.tar.gz dotfiles-bab2d5d01955fb8c4f4d2ab65e3ad196c5a61815.tar.bz2 dotfiles-bab2d5d01955fb8c4f4d2ab65e3ad196c5a61815.zip |
(Emacs/config)~simplify compilation mode config
Diffstat (limited to 'Emacs/.config/emacs/config.org')
-rw-r--r-- | Emacs/.config/emacs/config.org | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index aab3c56..a9829c2 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -2347,7 +2347,16 @@ description I give won't do it justice. (global-aggressive-indent-mode)) #+end_src ** Compilation -Colourising the compilation buffer so ANSI colour codes get computed. +Compilation mode, a super useful subsystem of Emacs which allows one +to run arbitrary commands. If those commands produce errors, +particularly errors that have a filename, column and line, +compilation-mode can colourise them and automatically help you +navigate to them. Very nifty. + +Here I add some bindings and a filter which colourises the output of +compilation mode for ANSI escape sequences; eyecandy is certainly nice +but it's just useful when dealing with tools that use those codes so +you can actually read the text. #+begin_src emacs-lisp (use-package compile :defer t @@ -2369,13 +2378,10 @@ Colourising the compilation buffer so ANSI colour codes get computed. (display-buffer-reuse-window display-buffer-at-bottom) (reusable-frames . t) (window-height . 0.25)) + :init + (setq compilation-scroll-output 'first-error) :config - (defun +compile/colourise () - "Colourise the emacs compilation buffer." - (interactive) - (let ((inhibit-read-only t)) - (ansi-color-apply-on-region (point-min) (point-max)))) - (add-hook 'compilation-filter-hook #'+compile/colourise)) + (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter)) #+end_src ** xref Find definitions, references and general objects using tags without |