title: Wait on shell command to finish before executing another elisp command
body: <p>I am trying to do the following:</p>
  
  <ol>
  <li>open a shell in emacs and cd into project folder</li>
  <li>Execute a mercurial pull from repository.</li>
  <li>"wait" until the pull finishes</li>
  <li>Communicate that the pull is finished to elisp command which fired up the shell command to begin with so it could carry on with compile command to build the tree.</li>
  </ol>
  
  <p>is there a way/code that would let me know when the shell command has finished before starting a new elisp command from inside .emacs file?</p>