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

URLs with underscores are displayed with org formatting #3

Closed
paulbdavis opened this issue Jan 24, 2020 · 6 comments
Closed

URLs with underscores are displayed with org formatting #3

paulbdavis opened this issue Jan 24, 2020 · 6 comments

Comments

@paulbdavis
Copy link

When there are underscores in URLs or in other stuff (like request bodies, headers) org mode displays them as being a subscript

get /endpoint?page_size=99 turns into this:

verb

@federicotdn
Copy link
Owner

federicotdn commented Jan 24, 2020

Hey @paulbdavis

The docs for org-use-sub-superscripts mention this:

Still, ambiguity is possible. So when in doubt, use {} to enclose
the sub/superscript. If you set this variable to the symbol ‘{}’,
the braces are required in order to trigger interpretations as
sub/superscript. This can be helpful in documents that need "_"
frequently in plain text.

So maybe I could make verb-mode set buffer-locally this variable to {}, so that there's less chance of this happening (but may still happen if you do foo_{bar}). What do you think of that?

@buicaocuong9595
Copy link

buicaocuong9595 commented Jan 24, 2020 via email

Repository owner deleted a comment from buicaocuong9595 Jan 24, 2020
Repository owner deleted a comment from buicaocuong9595 Jan 24, 2020
@federicotdn
Copy link
Owner

Let's try to keep the conversation on-topic. Thanks.

@federicotdn
Copy link
Owner

As I want to avoid messing with users' Org configs, for the moment I recommend you use file-locals to set org-use-sub-superscripts to {}:

# Local Variables:
# org-use-sub-superscripts: {}
# End:

Hope it's useful!

@paulbdavis
Copy link
Author

Yeah, the local variable solution works well. You may consider adding it to the README.

@federicotdn
Copy link
Owner

Good idea, thanks.

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

No branches or pull requests

3 participants