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

Idle doc: redo Syntax Colors section #69412

Closed
terryjreedy opened this issue Sep 23, 2015 · 8 comments
Closed

Idle doc: redo Syntax Colors section #69412

terryjreedy opened this issue Sep 23, 2015 · 8 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 25225
Nosy @terryjreedy, @roseman

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/terryjreedy'
closed_at = <Date 2015-09-25.03:29:04.773>
created_at = <Date 2015-09-23.23:11:41.630>
labels = ['expert-IDLE', 'type-bug']
title = 'Idle doc: redo Syntax Colors section'
updated_at = <Date 2019-03-23.04:14:21.778>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2019-03-23.04:14:21.778>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2015-09-25.03:29:04.773>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2015-09-23.23:11:41.630>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 25225
keywords = []
message_count = 8.0
messages = ['251468', '251480', '251481', '251482', '251535', '251565', '251567', '251568']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'markroseman', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25225'
versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

@terryjreedy
Copy link
Member Author

I plan to make the following changes to the Syntax colors section:

  • Change name to Text and syntax colors, as not all colors are code-syntax related.

  • Make it a subsection of the previous Editing and navigation section, which is about editor and shell windows, which are what get colored. Begin by stating that both window types get colored.

  • Greatly reduce excessive white space. Put item and default color on one line, such as * Strings: green, and single space lines.

  • Add missing item: color pairs

  • Correct instruction on how to change defaults.

@terryjreedy terryjreedy self-assigned this Sep 23, 2015
@terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Sep 23, 2015
@terryjreedy
Copy link
Member Author

Current:
3. Syntax colors

The coloring is applied in a background “thread,” so you may occasionally see uncolorized text. To change the color scheme, edit the [Colors] section in config.txt.

Python syntax colors:

Keywords
orange

Strings
green

Comments
red

Definitions
blue

Shell colors:

Console output
brown

stdout
blue

stderr
dark green

stdin
black

@terryjreedy
Copy link
Member Author

Possible alternative, with additions and corrections:
--------------------
3. Syntax colors

The coloring is applied in a background “thread,” so you may occasionally see uncolorized text. To change the color scheme, edit the [Colors] section in config.txt.

Python syntax colors:

Keywords: orange
Builtins: purple
Definitions: blue
Strings: green
Comments: red

Shell colors:

Console output: brown
Console error: black on red
stdin: black
stdout: blue
stderr: red

Other colors:
Cursor: black
Selected: black on gray
Found: white on black

@terryjreedy
Copy link
Member Author

The alternative above matches the format of help.txt, except that the latter has the colors lined up. The excessive addition of whitespace here was an argument against replacing help.txt with help.html (bpo-16893). I consider the proposed condensation to be most of a fix of a regression.

This sentence, "To change the color scheme, edit the [Colors] section in config.txt.", is strange in that it for help.txt, it was changed in 2002-12-11 to refer to the Highlights tab of the Configure dialog. In any case, the color list was added before that tab, but not seems not necessary. As a 'repeat', it is subject to obsolescence if not updated, which it has not been. So I think we should either drop the section or drop the colors and replace with a better description of what is being replaced.

2.4. Text and Syntax colors

Text is both editor and shell windows get color coded. The coloring is applied in the background, so you may occasionally see uncolor text. To change the color scheme, use the Configure IDLE dialog, Highlighting tab.

Colors can be set for the follow types of text.

Python syntax in both editor and shell: normal code, keywords, builtin class and function names, user-defined class and function names, strings, and comments.

Shell output: console output, console error text, user output, and user error output and tracebacks.

Other text: cursor, selected text, and text found by search.

Debugger breakpoint lines in the editor are indicated by a dark yellow background (not configurable).
----

Note: I believe the marking of found text is OS dependent and know that it is the subject of discussion in other issues, so this part needs elaboration.

@roseman
Copy link
Mannequin

roseman mannequin commented Sep 24, 2015

I'd suggest that there is no reason to include the list of what elements can be coloured, as it's there in the dialog for anyone who wants to muck with it. Just the first paragraph (two sentences) would be sufficient I think. Even dropping it from the document entirely wouldn't be a bad thing.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 25, 2015

New changeset 2f6aa20c05b3 by Terry Jan Reedy in branch '2.7':
Issue bpo-25225: Condense and rewrite Idle doc section on text colors.
https://hg.python.org/cpython/rev/2f6aa20c05b3

New changeset f5502ff7ae2d by Terry Jan Reedy in branch '3.4':
Issue bpo-25225: Condense and rewrite Idle doc section on text colors.
https://hg.python.org/cpython/rev/f5502ff7ae2d

@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 25, 2015

New changeset 36095aa6dd5e by Terry Jan Reedy in branch '2.7':
Issue bpo-25225: add revised .html.
https://hg.python.org/cpython/rev/36095aa6dd5e

New changeset a43d79b2434c by Terry Jan Reedy in branch '3.4':
Issue bpo-25225: add revised .html.
https://hg.python.org/cpython/rev/a43d79b2434c

@terryjreedy
Copy link
Member Author

I decided to keep a further condensed subsection. I think there is a bit of extra info, and we may need or want to say more after other changes, such as for bpo-7949, and the addition of a dark theme. The reference manual documents our current promises.

@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
topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant