I'm thinking about moving a personal library catalogue system into Org. This would involve ISBNs, and when ISBNs had 10 digits some would have leading zeros. It turns out leading zeros are removed when something looks like a number.

| 0006145396 |

#+begin_src shell :results output :var string=isbn
echo $string

: 6145396

I looked at org-babel-read, which calls org-babel--string-to-number ("If STRING represents a number return its value"), so it looks like that's always going to happen.

I could use a hack like prepending an X and then removing it later, but that's a bit ugly. Has anyone had this problem and worked around it some other way?


William Denton
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 424.57 ppm (Mauna Loa Observatory, 2023-05-27)

Reply via email to