Closed ameyp closed 10 years ago
Works fine for me on version 24.3.1. Package installed through melpa.
That's because melpa handles dependencies and adds all dependencies to the load-path for you. I don't want async on the load-path, I want to load it by specifying a relative path.
(load-file "/path/to/async.el")
and (require 'async "/path/to/async.el")
both work just fine for me on 24.3.1 on OS X. load-library
will never work because it only looks in load-path
.
@DarwinAwardWinner And you don't have async
on the emacs load-path?
Also, did you try the async-start
example from the README? Because that's when I get the error, not when I require
the module. Here's the async-start
example:
(async-start
;; What to do in the child process
(lambda ()
(message "This is a test")
(sleep-for 3)
222)
;; What to do when it finishes
(lambda (result)
(message "Async process done, result should be 222: %s" result)))
Ah, I see. Loading async.el is fine, but without async.el in the load-path, (funcall (symbol-function 'find-library-name) "async")
fails, so it can't tell the child process where to find async. I'll code up a pull request soon.
@DarwinAwardWinner Cool, thanks!
After loading the library with
(load-file "/path/to/async.el")
or(load-library "/path/to/async.el")
or(require 'async "/path/to/async.el")
, the async-start sample gives a"Can't find library async"
error. This is on Emacs 24.3.50.1