Hello, and thanks for your suggestion, but i probably don't understand you completely.
You wrote, when running duck inside emacs M-x shell, "...output looks garbled": Does this mean you see the escape codes literally printed on screen? Or do you have issues with the colors themselves? I tried to detect if duck outputs to a terminal or a pipe, and supress the color when piping. I just tried it out in Emacs 24.4.1, inside X as well as on the console, and I have no garbled output. I am very happy to implement this, but if possible, i would like to fix this in a more generic way, and not for Emacs only, so i would like to do the following: Inside M-x shell, the TERM variable is set to "dumb". I think it might be more correct if I use this as an indicator wether it's ok to show colors or not. I just tried it and it now behaves as git status/git log. What do you think about that? This would also be more graceful, if e.g running M-x term, which also has $INSIDE_EMACS set, but *is* capable of handling colors correctly. Please share your thoughts. Thanks, Simon Am 2016-11-11 um 05:46 schrieb Jari Aalto: > Package: duck > Version: 0.10 > Severity: wishlist > Tags: patch > > By default program enables color. However if run inside standard Emacs > M-x shell, the color cored are not interpreted and the output looks > garbled. > > Please consider applying the following patch which adds exception for > Emacs. > > Consideration not to enable colors by default > ----------------------------------------------- > > (1) In general, it might be considered that programs wouldn't use > colors by default. It's quite impossible to select correct colors for > various terminals considering that user may have chosen their own > default backgrounds and foregrounds -- thus the program's choices may > not play well with the users' selected colors. > > (2) Typically features are enabled by request. > > E.g in git(1) colors are enabled explicitly. >
signature.asc
Description: OpenPGP digital signature