help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if Emacs currently waits for output of a running proces


From: Kevin Rodgers
Subject: Re: How to check if Emacs currently waits for output of a running process in a visible buffer?
Date: Thu, 26 Aug 2004 11:38:35 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Klaus Berndl wrote:
> Currently i have something like
>
> (delq nil (mapcar (function (lambda (p)
>                               (and (process-buffer p)
>                                    (get-buffer-window (process-buffer p)))))
>                   (process-list)))
>
> If this returns not nil then there is currently at least one process-buffer
> visible - so far so good, but unfortunatelly this form also returns not nil if
> a *shell* buffer is visible, but here Emacs does not really wait for input. Is
> this understandable, makes this clear what I'm searching for?

You need to tell get-buffer-window to search all visible frames:

(delq nil
      (mapcar (lambda (process)
                (let ((buffer (process-buffer process)))
                  (and buffer (get-buffer-window buffer 'visible))))
              (process-list)))

--
Kevin Rodgers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]