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

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

Re: Distinguishing between interactive and asynchronous shell buffers


From: Stefan Monnier
Subject: Re: Distinguishing between interactive and asynchronous shell buffers
Date: Wed, 23 Feb 2011 11:03:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Digging into simple.el, the only difference I could find between
> asynchronous and interactive shell buffers is that the former have
> process sentinels associated with them when they're running; after they
> finish, they of course have no process at all.  That led me to write:

Indeed, there are very few differences between them.  Another way to
distinguish them is to look at the buffer's history: if you never type
in async-shell-command buffers, then the input history should be empty
in those buffers.  E.g. maybe checking (eq (point-min)
comint-last-input-start) will do the trick.
Another way is to check (string-match "Async" (buffer-name)).


        Stefan


reply via email to

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