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

sphinx: ansi color even on dumb terminal #48352

Closed
dottedmag mannequin opened this issue Oct 10, 2008 · 2 comments
Closed

sphinx: ansi color even on dumb terminal #48352

dottedmag mannequin opened this issue Oct 10, 2008 · 2 comments
Assignees

Comments

@dottedmag
Copy link
Mannequin

dottedmag mannequin commented Oct 10, 2008

BPO 4102
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-10-16.21:16:37.859>
created_at = <Date 2008-10-10.21:21:01.158>
labels = []
title = 'sphinx: ansi color even on dumb terminal'
updated_at = <Date 2008-10-16.21:16:37.858>
user = 'https://bugs.python.org/dottedmag'

bugs.python.org fields:

activity = <Date 2008-10-16.21:16:37.858>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-10-16.21:16:37.859>
closer = 'georg.brandl'
components = []
creation = <Date 2008-10-10.21:21:01.158>
creator = 'dottedmag'
dependencies = []
files = []
hgrepos = []
issue_num = 4102
keywords = []
message_count = 2.0
messages = ['74644', '74860']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'dottedmag']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4102'
versions = []

@dottedmag
Copy link
Mannequin Author

dottedmag mannequin commented Oct 10, 2008

Debian bug bpo-501629 (http://bugs.debian.org/cgi-bin/bugreport.cgi?
bug=501629).

Both sphinx-build and sphinx-quicksetup attempt (and fail) to use ansi
color sequences, even when TERM=dumb (for example, when run from an
emacs shell buffer, or m-x compile. This produces garbage, like this:

^[[01mSphinx v0.4.2, building linkcheck^[[39;49;00m

While it does look like I can add -N in the generated Makefile, and
thus this is only a wishlist item since I have a workaround - it
really shouldn't generate color unless it has *some* indication that
it might work - even mooching off of $LSCOLORS would be better than
doing it blindly, though it should be enough to look at a TERM or
TERMCAP property - or perhaps indirectly via curses.has_colors() which
does appear to be able to tell "xterm" from "dumb" successfully.

@birkenfeld
Copy link
Member

Should be fixed in r66933.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
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

1 participant