title: Emacs Modes: "Command attempted to use minibuffer while in minibuffer"
body: <p>Scenario:</p>
  
  <ul>
  <li>I start to type M-x to type a command</li>
  <li>I switch to another emacs window/buffer because I realise I'm executing the command in the wrong window</li>
  <li>I start to type M-x again to execute the command in the correct window</li>
  </ul>
  
  <p>Result: I get the dreaded "Command attempted to use minibuffer while in minibuffer"</p>
  
  <p>This happens to me multiple times a day while using emacs, and not just in this scenario.  This behaviour is highly user-hostile (ref. Modes and Pseudo-modes in <code>The Humane Interface</code> by Jef Raskin)</p>
  
  <p>Is there a way to customize emacs behaviour so that instead of giving this error, it just cancels the first minibuffer and replaces it with a new one?</p>