Fork me on GitHub

I went through a recent guide on setting up emacs to display emojis on my mac. In a clojure file I’m working on, I can paste in an emoji w/o issues. However, there are other characters (`\uD83D` , etc) that should be emojis but are rending as raw codes. Is there a simple fix? I tried changing buffer file encoding to UTF-16 but that doesn’t seem to help.


So, this morning, I’ve been trying and failing to understand why I can’t perform http requests from org-mode on Clojure apps that are being debugged with Cider. If the apps are simply run from a Cider repl, these kind of http requests work okay:

#+begin_src shell :results raw 
curl -X GET -k --header 'Accept: application/json' --header "authorization: Bearer ${token}" ''
But if I cider-debug-defun-at-point on the endpoint handler and execute the above org mode src block, it hangs with


I'm guessing that Emacs freezes while waiting for the curl to return, preventing the debugger from kicking in.


that sounds like a good theory. un-instrument the function, add a (Thread/sleep 15000) and see if you can interact with emacs while the request takes 15 seconds.


Trying, cheers guys!


Yeah, Emacs freezes for 15 seconds..


I wonder if I can make the org mode block async…


:results raw means it will put the result of the computation into the block right? If you drop that does it still freeze emacs? Maybe if it doesn’t have to wait on results it is a bit more free?


Emacs was single threaded for 30 years, so that's still the default pretty much everywhere. There might be some hoops you can jump through to mend that.


I’m currently trying but will try removing the :results header afterwards!


Neither that package with :async or removing the :results header improved matters.


Saying that, that package’s readme shows specifically sh babel scripts showing the benefits. Maybe my install didn’t work correctly.


RTFM @U064B4L0K!!!! I’d installed but forgotten to require it. Works a treat with

#+begin_src shell :results raw :async
both with 15 second sleep and debugging! Cheers!

🎉 2

If I execute pkill -SIGUSR2 Emacs , Emacs comes back to life with

Debugger entered--entering a function:
* symbol-overlay-refresh(1 5 0)
  call-process("/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/e...") nil "-c" "/bin/zsh")
  apply(call-process "/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/e...") nil ("-c" "/bin/zsh"))
  process-file("/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b...") nil "-c" "/bin/zsh")
  org-babel--shell-command-on-region("/bin/zsh" #<buffer  *Org-Babel Error*>)
  org-babel-eval("/bin/zsh" "token=$(curl -X GET -k --header 'Accept: applicati...")
  org-babel-sh-evaluate(nil "token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "replace" "raw") (:result-type . value) (:results . "replace raw") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no")) nil nil)
  org-babel-execute:shell("token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "replace" "raw") (:result-type . value) (:results . "replace raw") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no")))
  org-babel-execute-src-block(nil ("shell" "token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "raw" "replace") (:result-type . value) (:results . "raw replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 357 "(ref:%s)"))
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)