Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"^[[m" characters at beginning of compilation output #33

Open
oldstar84 opened this issue Jan 30, 2024 · 4 comments
Open

"^[[m" characters at beginning of compilation output #33

oldstar84 opened this issue Jan 30, 2024 · 4 comments

Comments

@oldstar84
Copy link

hello,
I am using GNU Emacs 27.1
i got some unwanted characters in my compilation output. See screenshot.
I know it is from the "M-x beginning-of-line" commands

Does anyone have the same issue?

csound-compilation

@sohet
Copy link
Contributor

sohet commented Mar 16, 2024

It is not the issue of csound mode but compilation mode. If you are using recent Emacs, just add the line
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
to your emacs init file, else see https://stackoverflow.com/questions/3072648/cucumbers-ansi-colors-messing-up-emacs-compilation-buffer for example.

@oldstar84
Copy link
Author

Thanks,
I added

(ignore-errors
  (require 'ansi-color)
  (defun my-colorize-compilation-buffer ()
    (when (eq major-mode 'compilation-mode)
      (ansi-color-apply-on-region compilation-filter-start (point-max))))
  (add-hook 'compilation-filter-hook 'my-colorize-compilation-buffer))

to my .emacs file.
Now, it is working. This issue can be closed.

@hlolli
Copy link
Owner

hlolli commented Jul 16, 2024

should we add this hook to csound-mode by default? Any reason not to?

@sohet
Copy link
Contributor

sohet commented Jul 19, 2024

I'm now using emacs 28.2 and csound 6.18 and adding the line
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
but did not need any such remedy before.
I think the need and the function to be added to the hook depends on versions of emacs and csound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants