My situation is this: I compile by invoking a system that runs perl scripts that invoke the Visual Studio compiler, as well as running some pre-compile tasks. By and large, the system works fine.

The problem comes when something in the pre-compile step fails. There's an error, but the compilation scripts expect input (since this would've normally been run in an interactive terminal). I usually just fix the problem and hit compile again, which kills off the previous process without issue. This isn't great, though, since I don't get any notifications that the compilation has 'finished', so sometimes I don't notice that I need to restart it. (I could stare at the compilation until it finishes, but that would get on my nerves really fast.)

So I guess what would be ideal would be to parse the compilation buffer until I see "Press a key to continue" and then send some sort of input that would finish the compilation and get my compile-finished-hooks to run. I've written compilation error regexps, but is it possible to cause a matched line to call a function? Or perhaps, since the output stops, I can use that as some sort of signal?

Problem solved--it turns out sending an invisible input as the compilation starts will queue up, and when the buffer is ready for input, it accepts it right away.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.