I would like to convert these two strings
"(a b c)"
"(9 . 3)"
to these
(a b c)
(9 . 3)
I'd had some luck with the first one evaluating this,
(mapcar 'intern (split-string (string-trim "(a b c)" "(" ")")))
basically, removes parentheses from string, splits it to ("a" "b" "c"), then calls intern
to turn all the elements to symbols and yields (a b c)
.
When evaluating this with "(9 . 3)"
though, It escaped all elements and yields (\9 \. \3)
,
this however, is not the same as (9 . 3)
that I wanted.