jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
832 stars 68 forks source link

(message ...) no longer works? #78

Closed PythonNut closed 6 years ago

PythonNut commented 7 years ago

Running the following example code:

(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)))

in an emacs25.2 -Q yields the following in the messages buffer:

For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Async process done, result should be 222: 222

Note that This is a test does not appear.

thierryvolpiatto commented 7 years ago

Jonathan Hayase notifications@github.com writes:

Note that This is a test does not appear.

AFAIK this never worked and should not work because this message is called in child emacs, the example in docstring should be instead:

(async-start
 ;; What to do in the child process
 (lambda ()
   (message "You should not see this message because it runs in the child emacs")
   (sleep-for 3)
   222)

 ;; What to do when it finishes
 (lambda (result)
   (message "Async process done, result should be 222: %s" result)))

-- Thierry Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997