title: Getting Emacs ansi-term and Zsh to play nicely
body: <p>I've been trying to use Zsh within my emacs session, without emacs remapping all the Zsh keys. I found ansi-term works pretty well for this but, I'm still having some problems. I was getting lots of junk characters outputted with, I was able to fix it with:</p>
  
  <pre><code>## Setup proper term information for emacs ansi-term mode
  [[ $TERM == eterm-color ]] &amp;&amp; export TERM=xterm
  </code></pre>
  
  <p>But everything still doesn't work perfectly. Now I am having trouble with output being drawn offscreen , especially when using something like C-r for search.</p>
  
  <p>What I found is that it works fine if you don't resize the window. I can reproduce it like:</p>
  
  <ol>
  <li>Launch a clean <code>emacs -q</code></li>
  <li>Start <code>ansi-term</code> and use <code>zsh</code></li>
  <li>Make window fullscreen</li>
  <li>Output something that fills the screen</li>
  <li>Type <kbd>C-r</kbd></li>
  <li>The prompt will be off the screen</li>
  </ol>
  
  <p>Maybe there is some way I can make the space between the output and the minibuffer larger to compensate for the overshoot?</p>
  
  <p>Anyone else have Zsh + Ansi-term working properly?</p>