Skip to content

Filenames in output should be quoted #539

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

Closed
alexreg opened this issue Jan 7, 2020 · 5 comments
Closed

Filenames in output should be quoted #539

alexreg opened this issue Jan 7, 2020 · 5 comments
Labels
good first issue A good issue for new contributors to try tackling!

Comments

@alexreg
Copy link

alexreg commented Jan 7, 2020

This is motivated by the fact I get output like the following in the LaTeX Compiler log window in VSCode:

Writing /Users/alex/Documents/A filename with spaces.tex (123 bytes)

and only /Users/alex/Documents/A gets highlighted as a filename. In any case, the general practice is to enclose filenames in console output as `/a/b/c`, I believe. This would solve the issue.

I don't know if it covers all cases, but the note_highlighted fn (second parameter) seems to be responsible for this sort of printing. The enclosing of filenames in backticks is probably best done at call-site however (using a helper function?).

While I'm writing this, a bonus would be comma-separating the number of bytes, e.g., 123,456,789 bytes -- or better yet, 123 MB (also kB and B of course). All for readability of course, since this is nitpicking!

@pkgw pkgw added the good first issue A good issue for new contributors to try tackling! label Jan 27, 2020
@pkgw
Copy link
Collaborator

pkgw commented Jan 27, 2020

There is almost surely a small Rust crate out there that implements the algorithm of taking a number of bytes and textifying it as 123 MiB or whatever else as needed. Both of these suggestions are good and would make great pull requests for someone interested in making their first project contribution!

@alexreg
Copy link
Author

alexreg commented Jan 28, 2020

@pkgw I'm really busy at the moment, but if someone doesn't get around to this in the next 2-3 weeks I should be able to do this! (Feel free to ping me around then.)

@ralismark
Copy link
Contributor

Can this be closed? Looks like a fix has been merged.

@pkgw
Copy link
Collaborator

pkgw commented Aug 5, 2020

Sure! We can always reopen, or make a new issue, if there's more to do.

@pkgw pkgw closed this as completed Aug 5, 2020
@alexreg
Copy link
Author

alexreg commented Aug 6, 2020

Thanks, glad to see this has been fixed!

burrbull pushed a commit to burrbull/tectonic that referenced this issue Oct 30, 2020
Addresses issue tectonic-typesetting#539

- Paths and filenames are now quoted in backticks
- File sizes are now expressed in appropriate units (KiB/MiB)

This adds a new dependency (byte-unit) for expressing file sizes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good issue for new contributors to try tackling!
Projects
None yet
Development

No branches or pull requests

3 participants