On Sun, Nov 02 2025, Ihor Radchenko wrote: > Kristoffer Balintona <[email protected]> writes: > >> I believe I have encountered a bug with `org-element-interpret-data`. >> Below is a simple case that demonstrates the misbehavior I observe. >> >> Given an org buffer will just the following plain list: >> + foo >> 1) bar >> when I call `(org-element-interpret-data (org-element-parse-buffer))`, I >> expect the returned string to be identical to the contents of the >> buffer, since to my understanding `org-element-interpret-data` is the >> reciprocal of `org-element-parse-buffer`. > > This expectation is not correct. > `org-element-interpret-data' loses certain information along the way > and normalizes keywords. For example, indentation is not retained and > keywords are downcased. In your case, lists are renumbered and > normalized to use consistent standard bullets. > >> Instead, the returned string is this: >> - foo >> 1. bar >> As is seen, the bullet points in the plain list are changed. It seems >> that all non-numbered bullet points are set to the "-" bullet point and >> all numbered bullet points are changed to "1."-style bullet points. This >> is true regardless of how large and how many levels the plain list is. > > This is expected and intentional. > > Not a bug. > Canceled.
Thank you for the clarification. > We can discuss whether parsing/printing loop should truly retain the > buffer contents byte-to-byte, but such feature would require major > changes in the parser and interpreter. It is not just about lists. Makes sense, and I don't think the necessary changes you describe would be worth pursuing. -- Kind regards, Kristoffer
