unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Perry Smith <pedzsan@gmail.com>
Cc: help-gnu-emacs List <help-gnu-emacs@gnu.org>
Subject: Re: waiting for asynchronous processes
Date: Sun, 16 Oct 2011 03:15:54 +0200	[thread overview]
Message-ID: <87d3dxzqgl.fsf@gmail.com> (raw)
In-Reply-To: <9669B9E0-85E4-4025-9596-FA77C8754E84@gmail.com> (Perry Smith's message of "Sat, 15 Oct 2011 19:17:03 -0500")

On Sun, 16 Oct 2011 02:17:03 +0200
Perry Smith wrote:

> Well, as I said, what I really wanted to use is "grep" (the built in emacs function).  
> I assumed I couldn't reach in and change him from asynchronous to synchronous -- can I?

I don't think you can, indeed. `grep' uses `compilation-start', which
only starts a synchronous process when asynchronous processes are not
available.

Depending on what exactly it is you're after, it might be better to just
define your own command, or try to modify the sentinel of the grep
process (the `grep' command returns the compilation buffer; you can get
at the associated process and its sentinel using the usual functions),
which, when done cleanly, would actually require defining another
command, too.

Looking at `compilation-handle-exit', even the default sentinel provides
several hooks for customising what happens when the process finishes,
namely `compilation-exit-message-function' and
`compilation-finish-function(s)', so just using (one of) these variables
might be sufficient for your needs.

-- 
Štěpán



  reply	other threads:[~2011-10-16  1:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3dxzqgl.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=pedzsan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).