reddit / emacs

Emacs compilation mode with weird prefix and suffix causes file not found

gws10463 · 2022-04-23 05:02
BunnyLushington · 2022-04-23 13:09
It looks the compiler is outputting bold text to the shell? If there's a compiler flag for turning that off, I'd start there; otherwise, maybe the variable `compilation-transform-file-match-alist` is of some help (it's in the compilation customization group). (You can see how the escapes work with something like `echo '\033[1mhello\033[0m' > /tmp/xxx` and then visiting /tmp/xxx with emacs.)
crawsphi · 2022-04-23 18:03
Those are ANSI control codes which describe text styles for terminals. You can add a hook so they will be rendered to face colors/attributes. In Emacs 28 there is one built in: (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter) Since the filter removes them from the text I would expect that to fix the error as well.