[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: synchronous M-x compile?
From: |
Lennart Borgman (gmail) |
Subject: |
Re: synchronous M-x compile? |
Date: |
Thu, 25 Sep 2008 12:23:23 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Chetan wrote:
> Dan Davison <davison@stats.ox.ac.uk> writes:
>
>> M-x compile runs the compile process asynchronously, and e.g.
>> (compile "make -k") always evaluates as true, even if there are
>> compilation errors. Is there a simple way to alter this behaviour so
>> that compile happens synchronously, and evaluates as false if there
>> are errors? I realise that one approach could be based on something
>> like (shell-command "make"), but ideally I'd like not to lose all the
>> other functionality in compile.el.
>>
>> As an aside, I guess that the motivation for asynchronous compile is
>> the time taken for compilation? This has obviously decreased a lot
>> during the life of emacs and I wonder what the distribution of compile
>> times looks like now for emacs users? I only work on simple, small
>> projects for which compilation takes a few seconds, and so I'm happy
>> to not start another task during that time. But perhaps I have no idea
>> how long compilation takes for those working on large projects?
>>
>> Dan
> As a quick and dirty solution, doesn't M-x compile followed by
> shell-command work?
Dan, maybe sentinels is what you are looking for? They do not do exactly
what you want, but you will know when compilation is ready.