Skip to content

sphinx: ansi color even on dumb terminal #48352

Closed

Description

@dottedmag
mannequin
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 = []

Activity

  1. dottedmag commented on Oct 10, 2008

    dottedmagmannequin
    MannequinAuthor

    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.

  2. birkenfeld commented on Oct 16, 2008

    @birkenfeld
    Member

    Should be fixed in r66933.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions