Ob-hy: Hy and Emacs Org Babel #2140
gliderproarc
started this conversation in
General
Replies: 1 comment 2 replies
-
Actually, it looks like this is already a solved problem. Joshua Munn made a pull request to get his fix for single quotes merged into the original repo, but it looks like the maintainer hasn't seen it. I am using the code from @jams2 now and ob-hy is working fine. If anyone else is looking for a fix to org Babel Hy execution, have a look at @jams2 's solution. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off, I want to say thank you to everyone who makes Hy possible. I have been really liking Python recently and wish I could get more LISP into my work and Hy is an amazing way to live in both worlds. I've only just started to learn programming and I'm still mostly just making toy projects in Hy but it's a lot of fun.
I have a question/request that is not related to Hy directly. It looks like there is a small bug in the ob-hy.el package that allows Hy code to be called from Emacs with this thing called Org-Babel. I did a little testing and all the problems I was getting from Emacs didn't happen when using Hy from the REPL on the command line. So the problem lies somewhere on the Emacs side of things, not in Hy.
The problem I am experiencing is with single quotes. Any time there is an odd number of single quotes in a bit of Hy code I ask to be evaluated, I get an error. There also appears to be some problem that comes up when using (py) and (pys) if it contains single quotes in the double quoted bit of Python.
...works just fine
This complains about unbalanced single quotes
Complains about "hel" not being declared.
also complains, and I am getting around it by using the (quote) function and then it runs just fine.
I'm hoping to get enough Elisp under my belt to be able to get it working myself, but if there is a way ob-hy can be part of the tooling Hy has for editor integration, I would love to be able to use Hy in Emacs Org-mode. The repository for ob-hy.el looks like it's unmaintained at the moment.
I also know that 1.0 of Hy has everyone very busy and I doubt the number of people using Hy include very many Org-Babel literate programming types. If anyone knows about how these bits of Hy code are being evaluated, I would love any tips I can get. While waiting for Hy 1.0, I will keep trying to hack on the Elisp that makes ob-hy work and see how far I can get.
Beta Was this translation helpful? Give feedback.
All reactions