Ioannis Kappas writes: > It is handled correctly as expected if the concatenated sequence is an > SGR, it is output as such, i.e. all > test/lisp/ansi-color-tests.el:ansi-color-incomplete-sequences-test > pass still pass. > > Here is the list of unit tests showing of what I consider correct > handling of non SGR sequences I have came up with thus far > > (ert-deftest ansi-color-context-non-sgr () > > [...] > > (with-temp-buffer > (let ((pretext (ansi-color-apply "\e[33;")) > (text (ansi-color-apply "1mHello World\e[0m"))) > (should (string= "Hello World" text)) > (should (equal (get-char-property 2 'font-lock-face text) > '(ansi-color-bold (:foreground "yellow3")))) > )) > ) Thanks. I took the liberty of working on your patch, adding support for ansi-color-apply-on-region, ansi-color-filter-region, ansi-color-filter-apply. I also added some tests as you suggested and made a minor simplification.