Nothing Special   »   [go: up one dir, main page]

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

Escape sequences in comint output #98

Open
doyougnu opened this issue Nov 29, 2023 · 1 comment
Open

Escape sequences in comint output #98

doyougnu opened this issue Nov 29, 2023 · 1 comment

Comments

@doyougnu
Copy link

Just added this to my doom emacs and am getting ANSI escape sequences in the comint output:

Gforth 0.7.9_20220127
Authors: Anton Ertl, Bernd Paysan, Jens Wilke et al., for more type `authors'
Copyright © 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `help' for basic help

�7
�7<0>                                                                                                                                                                                       | order: Forth Forth Root     Forth �8

in particular: ^[7 and ^[8. My install is just straight forward use-package (but hooked into Doom's package system):

(use-package! forth-mode
  :defer t
  :config

  (set-repl-handler! 'forth-mode 'forth-mode-switch-to-output-buffer)

  (set-lookup-handlers! 'forth-mode
    :documentation #'forth-spec-lookup-2012)

  (setq forth-executable "gforth")

  (map! :after forth-mode
        :map forth-mode-map
        :localleader
        "," #'run-forth
        "." #'forth-eval-last-expression-display-output
        "u" #'forth-eval-last-expression
        "'" #'forth-load-file
        "r" #'forth-eval-region
        "s" #'forth-see
        "S" #'forth-switch-to-output-buffer
        "e" #'forth-eval-defun
        "R" #'forth-restart
        "H" #'forth-spec-lookup-1994
        "h" #'forth-spec-lookup-2012
        ))

From reading the source I would have expected forth-scrub to filter these out but that doesn't seem to be the case. I do use:

(add-to-list 'comint-output-filter-functions 'ansi-color-process-output)

to process the sequences for other modes but this does not work for forth-interactive-mode

@larsbrinkhoff
Copy link
Owner

Thanks for the bug report. Unfortunately I'm busy with other things, so I don't have time to look into this now.

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

2 participants