all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* waiting for asynchronous processes
@ 2011-10-15 17:20 Perry Smith
  2011-10-15 22:24 ` Štěpán Němec
  0 siblings, 1 reply; 8+ messages in thread
From: Perry Smith @ 2011-10-15 17:20 UTC (permalink / raw)
  To: help-gnu-emacs List

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

I was trying to write a keyboard macro that included using grep and the first hit that it found.  The problem was that I had to wait for the grep to finish.  I'm not sure why but (sit-for 1) didn't work.

I started looking for a built in way to wait for an asynchronous command to complete and discovered that I had written one long long time ago in a galaxy far far away.

> (defun wait-for-async-process ( proc )
>   "Wait for PROC to finish"
>   (while (null (eq (process-status proc) 'exit))
>     (accept-process-output)))


I went ahead and looked for something like it in the distribution but didn't see it.

I'm curious if I overlooked it.

pedz


[-- Attachment #2: Type: text/html, Size: 1250 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-16 12:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 17:20 waiting for asynchronous processes Perry Smith
2011-10-15 22:24 ` Štěpán Němec
2011-10-16  0:17   ` Perry Smith
2011-10-16  1:15     ` Štěpán Němec
2011-10-16  1:49       ` Perry Smith
2011-10-16  9:16         ` Štěpán Němec
2011-10-16 12:49           ` Perry Smith
2011-10-16  9:21         ` Thien-Thi Nguyen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.