branch: master
commit dc63b59ee958a83ba196e7285388d405ccf1da26
Author: Mike Neilsen <[email protected]>
Commit: Mike Neilsen <[email protected]>
Documentation tweaks; mention DEFAULT-DIRECTORY
---
README.md | 17 +++++++++--------
async.el | 3 ++-
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index f34b2ab..bc764ba 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ The interface is intended to be very easy to use:
## async-start
async-start START-FUNC FINISH-FUNC
-
+
Execute START-FUNC (often a lambda) in a subordinate Emacs process. When
done, the return value is passed to FINISH-FUNC. Example:
@@ -40,7 +40,7 @@ done, the return value is passed to FINISH-FUNC. Example:
;; What to do when it finishes
(lambda (result)
(message "Async process done, result should be 222: %s" result)))
-
+
If FINISH-FUNC is `nil` or missing, a future is returned that can be inspected
using `async-get`, blocking until the value is ready. Example:
@@ -57,7 +57,7 @@ using `async-get`, blocking until the value is ready.
Example:
(async-get proc)))
If you don't want to use a callback, and you don't care about any return value
-form the child process, pass the `'ignore` symbol as the second argument (if
+from the child process, pass the `'ignore` symbol as the second argument (if
you don't, and never call `async-get`, it will leave ``*emacs*`` process
buffers
hanging around):
@@ -74,17 +74,18 @@ however, as an argument to `async-ready` or `async-wait`.
## async-start-process
async-start-process NAME PROGRAM FINISH-FUNC &rest PROGRAM-ARGS
-
+
Start the executable PROGRAM asynchronously. See `async-start`. PROGRAM is
passed PROGRAM-ARGS, calling FINISH-FUNC with the process object when done.
If FINISH-FUNC is `nil`, the future object will return the process object when
-the program is finished.
+the program is finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
+working directory.
## async-get
async-get FUTURE
-
-Get the value from an asynchronously function when it is ready. FUTURE is
+
+Get the value from an asynchronously called function when it is ready. FUTURE
is
returned by `async-start` or `async-start-process` when its FINISH-FUNC is
`nil`.
@@ -92,7 +93,7 @@ returned by `async-start` or `async-start-process` when its
FINISH-FUNC is
async-ready FUTURE
-Query a FUTURE to see if the ready is ready -- i.e., if no blocking
+Query a FUTURE to see if its function's value is ready -- i.e., if no blocking
would result from a call to `async-get` on that FUTURE.
## async-wait
diff --git a/async.el b/async.el
index d44f14a..be9c04e 100644
--- a/async.el
+++ b/async.el
@@ -200,7 +200,8 @@ its FINISH-FUNC is nil."
PROGRAM is passed PROGRAM-ARGS, calling FINISH-FUNC with the
process object when done. If FINISH-FUNC is nil, the future
object will return the process object when the program is
-finished."
+finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
+working directory."
(let* ((buf (generate-new-buffer (concat "*" name "*")))
(proc (let ((process-connection-type nil))
(apply #'start-process name buf program program-args))))