Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build clojure expressions as elisp sexps, then print them compatibly to strings #15

Closed
wants to merge 1 commit into from

Conversation

purcell
Copy link
Member

@purcell purcell commented Oct 30, 2012

Hey @samaaron, I thought you might find this interesting.

Those strings full of clojure inside ac-nrepl bugged me, so I started wondering if we could just send sexps. Turns out that it's possible; you just have to avoid some Clojure reader syntaxes (like "#{}") which are incompatible with Elisp's reader.

This trick makes assembling the sexps much easier, because they can just be backquoted together rather than relying on "format".

The downside was that it required some custom printing trickery to work around the fact that Elisp normally prints symbols like clojure.core/map as clojure\.core/map. A further minor downside is that the elisp indentation doesn't understand Clojure's indentation rules.

I'd be interested to hear what you think.

-Steve

@samaaron
Copy link
Contributor

Looks nice, although the strings full of Clojure should bug us! They scream out "push me somewhere upstream!"

Additionally, although paredit friendly, I wonder whether this approach might introduce subtle bugs that might be hard to locate and squash...

@purcell
Copy link
Member Author

purcell commented Oct 30, 2012

Yeah, I'm on the fence about this one too. :-)

@dgutov dgutov mentioned this pull request Apr 4, 2013
@purcell purcell closed this Nov 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants