Closed goofansu closed 10 years ago
Are you running the latest version? It seems to work perfectly fine on my machine. Or, I have to change to 127.0.0.1
instead of localhost
, but I thought that was because I have done something stupid to my config and I haven't bothered to figure out how to turn it back.
You could try to add M-x edebug-defun
to org-babel-execute:es
and es-org-execute-request
and trace the execution and see if it does something wrong on the way. To do that you need to open ob-elasticsearch
(in the es-mode folder) and run M-x edebug-defun
inside the defun
statement each of the functions I mentioned. Then you call C-c C-c
in the org-src-block and edebug will open a new window. To continue the execution you need to press n
. This will step you through the execution of the functions and display the result of each execution in the minibuffer.
I downloaded elasticsearch 1.1.1. It's ok with 127.0.0.1
but error with localhost
.
Don't know why, but the problem was solved.
Thanks.
Are you running OS X?
Yes
Kind Regards, goofansu
2014-04-27 0:52 GMT+08:00 Bjarte Johansen notifications@github.com:
Are you running OS X?
— Reply to this email directly or view it on GitHubhttps://github.com/dakrone/es-mode/issues/9#issuecomment-41473882 .
Ok, then it isn't just me as I assumed earlier. I will look into this. I edited the issue title to better reflect what the problem is. If you are not interested in getting updates on the issue I think you can remove yourself from the watch list.
Ok, thank you for writing this mode.
Your methods to test elasticsearch impressed me a lot.
It seems to be that this is an emacs bug and not a problem with the way we use url-retrieve
. It is already fixed, but not in the current stable.
It did however start working again on my machine. I don't know why. Below follows the minimal example if someone wants to try it. (It needs a http-server running on localhost:9200 of course.) I am closing this issue as there is not anything we can do here to fix this.
(let ((url-request-method "GET"))
(url-retrieve "http://localhost:9200"
(function
(lambda (status)
(view-buffer-other-window
(current-buffer))))))
Test code:
Curl results from "http://localhost:9200/_search?pretty":
Any advice to debug what is wrong? Thank you