Skip to content

bpo-37692: Improve highlight config sample#14983

Merged
terryjreedy merged 7 commits into
python:masterfrom
terryjreedy:shellhilite
Jul 28, 2019
Merged

bpo-37692: Improve highlight config sample#14983
terryjreedy merged 7 commits into
python:masterfrom
terryjreedy:shellhilite

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Jul 27, 2019

Copy link
Copy Markdown
Member

Use an example shell interaction in the sample and better labels for shell elements.

https://bugs.python.org/issue37692

@terryjreedy

Copy link
Copy Markdown
Member Author

I intend to merge this tomorrow (Sunday). Any comments before that?

I am pretty happy with the simulated shell session. I tried putting the cursor blob where the blank line above the prompt is, but that blank is. I will try putting it up under code context, as it has no particular assoication with Shell.

As for the label changes. My special concern is with beginners.

'Normal Text' is mainly used for code unless one is editing a text file, so 'Normal Code of Text'.

'Shell Normal Text', is technically correct (and confusing), since it is used for normal output from Shell itself (but not, now, for Restart lines). But what is that? The prompt. And '[DEBUG ONOFF]', which beginners will likely not have seen. So 'Shell Prompt' seems better.

'Shell Error Text' is wrong in that it is mainly (exclusively?) used to mark syntax error locations in both shell and editor. So just 'Error Text' is better.

'Shell Stdout Text' is not the stdout of Shell. It is used for text the users send to stdout, usually by print, usually by default, usually in a separate process which gets displayed in Shell. Beginners might not even be familiar with 'stdout' (and 'stderr') 'Shell User Output' seems better even if not the best possible. In any case, the output that clearly results from user input should make its meaning clear.

The case with 'Shell Stderr Text' is similar.

@terryjreedy terryjreedy changed the title bpo-37693: Improve highlight config sample bpo-37692: Improve highlight config sample Jul 27, 2019
@taleinat

Copy link
Copy Markdown
Contributor

@terryjreedy, I trust your judgement, and this looks alright.

My only minor note is that typing python in the shell isn't common; perhaps use a more realistic example such as print?

@terryjreedy
terryjreedy merged commit b222955 into python:master Jul 28, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

@terryjreedy: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington

Copy link
Copy Markdown
Contributor

I'm having trouble backporting to 3.8. Reason: 'Error 110 while writing to socket. Connection timed out.'. Please retry by removing and re-adding the needs backport to 3.8 label.

@bedevere-bot

Copy link
Copy Markdown

GH-14990 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 28, 2019
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-14991 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 28, 2019
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@terryjreedy
terryjreedy deleted the shellhilite branch July 28, 2019 16:17
miss-islington added a commit that referenced this pull request Jul 28, 2019
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@terryjreedy

Copy link
Copy Markdown
Member Author

@Mariatta I routinely backport to 3.8 and 3.7 and the 3.8 backport routinely fails on the first try, and succeeds on the second. There clearly is some problem with doing two backports in the same invocation. Sometimes the failure is almost immediate (the last two times before this), sometime delayed after the timeout.

miss-islington added a commit that referenced this pull request Jul 28, 2019
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@terryjreedy

Copy link
Copy Markdown
Member Author

Tal, obviously real code with a simulated accidental space syntax error looks better.

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
Use an example shell interaction in the sample and better labels for shell elements.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Use an example shell interaction in the sample and better labels for shell elements.
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Use an example shell interaction in the sample and better labels for shell elements.
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

Successfully merging this pull request may close these issues.

5 participants