Documentation
Commentary
This file provides a function that takes a string or a region containing Select Graphic Rendition (SGR) control sequences (formerly known as ANSI escape sequences) and tries to translate these into faces. This allows you to run ls --color=yes in shell-mode. It is now enabled by default; to disable it, set ansi-color-for-comint-mode to nil. Note that starting your shell from within Emacs might set the TERM environment variable. The new setting might disable the output of SGR control sequences. Using ls --color=yes forces ls to produce these. SGR control sequences are defined in section 3.8.117 of the ECMA-48 standard (identical to ISO/IEC 6429), which is freely available as a PDF file <URL:https://www.ecma-international.org/publications/standards/Ecma-048.htm>. The "Graphic Rendition Combination Mode (GRCM)" implemented is "cumulative mode" as defined in section 7.2.8. Cumulative mode means that whenever possible, SGR control sequences are combined (i.e. blue and bold). The basic functions are: `ansi-color-apply' to colorize a string containing SGR control sequences. `ansi-color-filter-apply' to filter SGR control sequences from a string. `ansi-color-apply-on-region' to colorize a region containing SGR control sequences. `ansi-color-filter-region' to filter SGR control sequences from a region. Thanks Georges Brun-Cottan <gbruncot@emc.com> for improving ansi-color.el substantially by adding the code needed to cope with arbitrary chunks of output and the filter functions. Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> for pointing me to ECMA-48. Stefan Monnier <foo@acm.com> for explaining obscure font-lock stuff and for code suggestions.
Requires
Dependencies
No package dependencies recorded.
Consumers
Reverse Dependencies
- fink
- mldonkey
- tty-format
- emacs
- man
- ack
- ack-menu
- alchemist
- bitbake
- cider
- cljsbuild-mode
- cryptol-mode
- ecukes
- elm-mode
- emacspeak
- foreman-mode
- git-command
- gitlab
- grunt
- haskell-mode
- idris-mode
- immutant-server
- karma
- magit
- maude-mode
- minitest
- mutant
- nim-mode
- nodejs-repl
- overseer
- php-boris
- platformio-mode
- pow
- prodigy
- python-mode
- rails-log-mode
- rake
- rinari
- rspec-mode
- runtests
- sly-repl-ansi-color
- sonic-pi
- yari
- multi-shell
- ein
- flycheck-rebar3
- cmd-to-echo
- test-kitchen
- puppet-mode
- inf-clojure
- fstar-mode
- flycheck
- wandbox
- js-comint
- indium
- rails
- dhall-mode
- spiral
- ledger-mode
- helm-rg
- upbo
- pyramid
- elixir-mode
- elm-test-runner
- emidje
- exunit
- reformatter
- ess
- jupyter
- theme-magic
- slime-repl-ansi-color
- color-theme-sanityinc-tomorrow
- magit-tbdiff
- telega
- anaconda-mode
- djangonaut
- sbt-mode
- treemacs
- git-walktree
- gap-mode
- helm
- dap-mode
- pronto
- konoha-mode
- perl-utils
- quickrun
- tora-mode
- eshell
- mix
- firestarter
- envrc
- org-roam
- gdscript-mode
- arduino-cli-mode
- comby
- prettier
- gitlab-pipeline
- elpher
- rainbow-mode
- compiler-explorer
- scala-mode
- geiser
- eide
- ess-view-data
- dirvish
- diff-ansi
- gnus
- helm-system-packages
- detached
- justl
- fancy-compilation
- auctex-cluttex
- eldev
- zuul
- python
- haskell-tng-mode
- eat
- term
- fzf
- fennel-mode
- lab
- tramp
- difftastic
- eask
- easky
- racket-mode
- noman
- sdml-mode
- vsh-mode
- eldoc-diffstat
- aidermacs
- vc-jj
- ddp
- weather-scout
- pdd
- beluga-mode
- greger
- consult-gh
- python-tdd-mode
- ob-duckdb
- pass-coffin
- cg
- git-sync-mode
- pi-coding-agent
- devcontainer
- duckdb-query
- magit-pre-commit
- lsp-bridge
- compilation-history
- ben
- verdict
- ghostel
- taskjuggler-mode
- colorful-mode
- uiua-mode