← Back to context

Comment by arboles

1 day ago

So you can type *word* without it becoming bold? So an article can contain: "The logs come to about ~300 lines once you start the server with ~systemctl start fnord~"

The `code` equivalent in Org is ~code~. How do you type that without the Org highlighting removing the ~ from "~300 lines", thinking that the code snippet begins there? This is an example I got from grepping my org files for U+200B.

I wasn't sure how to do this, so I looked into it:

If you (setq org-pretty-entities t) below will render correctly in org buffers, and exports correctly too.

The logs come to about \tilde{}300 lines once you start the server with ~systemctl start fnord~

Here's a star: \ast

I see. Just gave it a try and backslash works as escape. Though also I'm probably unlikely to experience such issues myself as my Emacs theme shows formatting characters even after applying the formatting.

  • The following:

      \~300 lines
    

    Still exports as <p>\~300 lines</p> (in case of an HTML export). In fact you could "escape it" with any character, the backslash isn't doing anything special, the formatting just doesn't trigger if there's no white space on one side. When I use Org I also do not have auto-formatting, as you do, but the highlighting would still be wrong. And it'd be masochistic to put up with that unless you've invested a lot into Org for other reasons.

    • Sounds to me like it's a shortcoming of the exporter then, to not remove the escape characters as appropriate. Though one would think others would've run into this issue and fixed it. Or perhaps you're missing some other prevalent alternative?

      The highlighting corrects for me once I "escape" the "~300".

      2 replies →