-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I'm really loving xterm-color; thanks for writing it!
I just wanted to note one issue I ran into (and my somewhat hacky workaround).
I've added xterm-color functionality to compilation output via the method described in the docs:
(defun my/advice-compilation-filter (f proc string)
(funcall f proc (xterm-color-filter string)))
I'm using projectile and the ag search functionality it comes with, and I found that this breaks the ability to jump to search results in ag output buffers. It would seem that some of the filtering xterm-color is doing interferes with the filtering ag is doing to parse its output.
My hacky workaround is to only apply the filter if the buffer name starts with "*compilation"
(defun my/advice-compilation-filter (f proc string)
(funcall f proc (if (string-prefix-p "*compilation" (buffer-name (process-buffer proc)))
(xterm-color-filter string) string)))
I'm not really sure if this would be considered xterm-color's problem or Ag's problem; I just wanted to mention it. Would there perhaps be an elegant way to differentiate compilation buffers kicked off by the user vs ones used by things like ag?