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

Flag to use only ASCII output #294

Open
byorgey opened this issue Jun 27, 2021 · 3 comments
Open

Flag to use only ASCII output #294

byorgey opened this issue Jun 27, 2021 · 3 comments
Labels
C-Moderate Effort Should take a moderate amount of time to address. S-Nice to have Minor importance U-Pretty Printing Z-Feature Request Z-Student Good project for a student.

Comments

@byorgey
Copy link
Member

byorgey commented Jun 27, 2021

Perhaps the default should be to pretty-print everything using ASCII syntax --- for ease of copy-pasting --- but with an extension to enable pretty-printing with Unicode syntax?

@byorgey byorgey added C-Moderate Effort Should take a moderate amount of time to address. Z-Feature Request U-Pretty Printing S-Nice to have Minor importance labels Jun 27, 2021
@byorgey
Copy link
Member Author

byorgey commented Mar 19, 2022

Nah, copy-pasting is easy enough no matter whether we use ASCII or arbitrary Unicode. Actually, now I am thinking that I like the default of printing things using nice-looking syntax, but we should add a flag to use only ASCII. This is related to #250 --- doing the switch would probably help here.

@byorgey byorgey changed the title Extension to pretty-print with Unicode syntax Flag to use only ASCII output Mar 19, 2022
@byorgey
Copy link
Member Author

byorgey commented May 18, 2022

We could actually do this pretty easily even without doing #250 --- just add a flag to the read-only context for pretty-printing and use it to select ASCII-only concrete syntax (instead of just using the first thing in the list).

@byorgey
Copy link
Member Author

byorgey commented Feb 2, 2024

One original idea I had was to annotate each terminal with its ASCII equivalent, and select which to use at rendering time. But note that doesn't allow prettyprinter to take the different widths into account. So I think this does just need to look like a flag to the prettyprinter so that it selects which concrete syntax to use.

@byorgey byorgey added the Z-Student Good project for a student. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Moderate Effort Should take a moderate amount of time to address. S-Nice to have Minor importance U-Pretty Printing Z-Feature Request Z-Student Good project for a student.
Projects
None yet
Development

No branches or pull requests

1 participant