Bug report
* Bug report I have trouble escaping a dollar sign in org-mode documents. I tried to enter the following: #+begin_src A (14 G$) B (6 G$) #+end_src This may look weird to an American viewer, but in Finland we place all units (including monetary units) after the quantity. Anyhow, org-mode interprets this as follows: #+begin_src A (14 G) B (6 G) #+end_src This is the documented behavior: single '$' characters are treated as math delimiters if 1. the enclosed text contains at most two line breaks (there are none). 2. the enclosed text is directly attached to the '$' characters with no whitespace in between (it is). 3. the closing '$' is followed by a whitespace, punctuation or a dash (it is). The standard trick of adding a zero-width space (``) after the first '$' (breaking rule 2 above) doesn't however work as expected: #+begin_src A (14 G$) B (6 G$) #+end_src is rendered as #+begin_src A (14 G) B (6 G$) #+end_src Changing the zero-width space to a visible space fixes the interpretation, but also visually moves the closing parenthesis. I believe zero-width space is incorrectly interpreted as a non-whitespace here. It does not seem to be an exporter bug as both LaTeX and HTML exporters are affected. Thanks, Topi
Re: Bug report
Looks like I was trying to be too clever. :) I used org-mode to write the bug report. The problem isn't that the formatting fails in source code blocks. I put it in one so that it would appear verbatim. If you copy the contents of the block into a normal paragraph, you should be able to see the problem. I'm running Emacs 29.0.50 (from git) and org 9.5.3. Sent with Proton Mail secure email. --- Original Message --- On Wednesday, June 1st, 2022 at 6:37 PM, Eric S Fraga wrote: > On Wednesday, 1 Jun 2022 at 07:53, Topi Mäenpää wrote: > > > I have trouble escaping a dollar sign in org-mode documents. I > > tried to enter the following: > > > > #+begin_src > > A (14 G$) B (6 G$) > > #+end_src > > > I have no problem with this. What version of org are you using? > > Out of curiosity, what language is this? I ask because #+begin_src > expects a language argument normally. Otherwise, I would use an example > block, e.g.: > > #+begin_example > A (14 G$) B (6 G$) > #+end_example > > which may also help with your problem. > > -- > : Eric S Fraga, with org release_9.5.3-520-g4dda0d in Emacs 29.0.50