@lee I'm trying to fix the problem that @delaguardo mentioned above, but I see that :track-position has several spellings in this doc:
https://github.com/clj-commons/rewrite-clj/blob/main/doc/01-user-guide.adoc#position-tracking
:track-position ...
:track-position? ...
:track-positon ...
@borkdude Just in case you might not remember, I tried to fix that in https://github.com/borkdude/rewrite-edn/pull/11 but failed. Hope you can find a fix.
@rfhayashi Yeah, I remember, thanks for bringing that up again. This time I tried to go a little deeper and discovered more issues with that...
So I'll have to go another round at this and yet go deeper... but luckily @lee offered to look at this as well.
At least we have a workaround
none of them work for me in my case, but this is probably a different problem :)
Is my assumption wrong that when I insert new nodes with track-position true, that those nodes will have an updated position as well?
I think I'll just work around this stuff by transforming to string and re-reading
or maybe document that one should do it like that
Oh boy, somebody is bad with typos!
Yeah, that's the idea a zipper with :track-position? enabled should mean a zipper that can return a position (and position-span if you are interested in that) that is correct after updates.
Thanks for noting the typos... I'll fix 'em soon.
@lee I'll look into position later, somehow the metadata was still nil for newly inserted nodes, but maybe that's expected
yeah... I'll have to refresh my memory.... metadata on node might not be updated for the position tracking zipper...
then there might still be hope, if I use position instead of meta
💤
Ya, think so! Have a good zzzz!
Ya, position tracking zipper tracks location in zipper, not in nodes.
Also: typos fixed on master.