* How to check if Emacs currently waits for output of a running process in a visible buffer?
@ 2004-08-26 16:19 Klaus Berndl
2004-08-26 17:38 ` Kevin Rodgers
2004-08-26 19:33 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Klaus Berndl @ 2004-08-26 16:19 UTC (permalink / raw)
Hi,
i think the subject says all, doesn't it?
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?
Thanks for hints in advance!
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to check if Emacs currently waits for output of a running process in a visible buffer?
2004-08-26 16:19 How to check if Emacs currently waits for output of a running process in a visible buffer? Klaus Berndl
@ 2004-08-26 17:38 ` Kevin Rodgers
2004-08-26 19:33 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-08-26 17:38 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to check if Emacs currently waits for output of a running process in a visible buffer?
2004-08-26 16:19 How to check if Emacs currently waits for output of a running process in a visible buffer? Klaus Berndl
2004-08-26 17:38 ` Kevin Rodgers
@ 2004-08-26 19:33 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2004-08-26 19:33 UTC (permalink / raw)
> 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?
The difference between *shell* and the rest is one of intent, i.e. one that
can't be checked without the intervention of the user.
E.g. even the *shell* buffer might be running `tail -f' and thus be waiting
for output.
But depending on what you want to do you might be able to use
process-query-on-exit-flag (aka process-kill-without-query).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-26 19:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-26 16:19 How to check if Emacs currently waits for output of a running process in a visible buffer? Klaus Berndl
2004-08-26 17:38 ` Kevin Rodgers
2004-08-26 19:33 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).