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
Can't find ob-shell? #19
Comments
Please add your troubleshooting artifacts as described in the README and I'll be happy to take a look. |
I also encountered this issue. I have attached the troubling artifacts as requested in the README. I changed the filetype to .org.txt as org filetypes are not supported in uploads. |
@astahlman The mistake was on my end in my configuration. The problem was caused by trying to using the wrong name to load org babel shell script support (see commented out line of code from my config). Making the change below solved my issue. (org-babel-do-load-languages 'org-babel-load-languages
'((ruby . t)
(emacs-lisp . t)
(R . t)
;; (sh . t) ; WRONG, commented out, cause of this issue
(shell . t) ; CORRECT
(C . t)
(haskell . t)
(js . t)
(java . t)
(css . t)
(sass . t)
(octave . t)
(sql . t)
(sqlite . t)
(lisp . t)
(python . t)
)) ;; activate languages for org-babel |
@preetpalS Glad you got it sorted out. Thanks for updating with details on the fix, hopefully this will resolve the problem for others facing the same error (cc @paulrd). |
I have the same problem. How does the subprocess load dependencies? I use Cask for my personal setup and I think the subprocess has incorrect load path and can't find org package. I have the config correct with |
@Fuco1 The child should inherit its Lines 133 to 136 in 99a6f24
If you attach your troubleshooting.org I can take a look. |
@astahlman I've added
after the exec path line you mentioned and now things work. |
By the way the |
@Fuco1 Of course you're right about So glad to hear that you found |
Maybe problems like these (involving recreating the library user's configuration in a child Emacs process) can be avoided altogether by using threads (available in Emacs 26 (I'm using it now although it's not released yet I believe)) for the asynchronous processing. I wrote a (somewhat ugly) thread-based replacement for https://github.com/jwiegley/emacs-async/blob/15bcbf6beae65d7606f0655711159ca56f050c6b/async.el#L241. I'd be willing to contribute it to any packages that are willing to use it (by posting it into the public domain). ;; The following requires lexical binding to be activated in the file where it is defined
;; Possible replacement for existing function being used by library. It is a bit ugly though.
(defun async-start (start-func &optional finish-func)
"`finish-func' is executed with the return values from `start-func'."
(let* ((start-func-results nil)
(start-func-thread (make-thread (lambda () (setq start-func-results (funcall start-func)))))
(check-interval 3)
(start-func-check-func
(lambda (start-func-check-func)
(if (thread-alive-p start-func-thread)
(run-at-time check-interval nil start-func-check-func start-func-check-func)
(progn
(when (functionp finish-func)
(thread-join start-func-thread)
(funcall finish-func start-func-results)))))))
(run-with-timer check-interval nil start-func-check-func start-func-check-func)))
;; Sample usage
(async-start (lambda () (sleep-for 14) "Hello") #'princ)
;; Emacs version information
(emacs-version) ;; "GNU Emacs 26.0.91 (build 1, x86_64-unknown-freebsd11.1, GTK+ Version 3.22.15) of 2018-01-24" Although this idea assumes that the given start-func argument can be invoked safely in multiple threads. |
@preetpalS That's a very interesting idea. In addition to eliminating inconsistencies in the I'd love to see a proof of concept for this idea. Unfortunately, I don't think I'll have the free time to tackle it in the near future. |
@astahlman Personally I am fine with the way the library works as is, so I am not going to try to implement a proof of concept for this (although it would be great as it would make the library more efficient and it would be a great way to use the newly added threading capabilities in Emacs 26). |
I created a simple proof of concept even though I said I wouldn't (it didn't take more than 10 minutes). In that proof of concept, only Emacs Lisp seems to be able to execute asynchronously with the thread based implementation of async-start. See #22. |
@astahlman I made a mistake in interpreting what type of threading (its cooperative threading which means that only a single thread will execute at any given point in time) was being introduced in Emacs 26 (only one thread can run at a time). This means that my proof-of-concept does not work as expected (it only seemed to work based on the test cases that I used in my limited testing). |
Closing due to inactivity. |
This is a copy of #7 as it was closed prematurely.
The text was updated successfully, but these errors were encountered: