I have a Ubuntu 13.10 server installed in VirtualBox on a Windows host. When I connect to it via SSH (tried Putty, Cygwin's OpenSSH and OS X terminal from a different machine) Emacs appears to be having screen (re)drawing issues. Here's my test scenario:

  1. emacs ~/.bashrc
  2. C-s HIST (incremental search for "HIST")
  3. keep hitting C-s (aka jump to the next search result)

After repeating no. 3 a few times, I end up with this:


The problem doesn't occur when using VirtualBox console. 12.04 works fine as well. Tried the emacs23-nox package, the latest emacs from ppa:cassou/emacs, emacs -q (skip start-up files), running it in a "screen" session, changing LC_ALL to C - all to no avail.

Any ideas what might be causing the issue?

  • Try setting the TERM=xterm environment variable before starting emacs (export TERM=xterm or TERM=xterm emacs) or look in your Putty settings for the terminal type. – Lekensteyn Feb 9 '14 at 14:30
  • I'm afraid neither xterm nor xterm-256color help. – heypiotr Feb 9 '14 at 16:11

Huh, strange story. Changing the number of CPUs in VirtualBox from 2 to 1 fixed the problem.

  • Had the same issue, fixed after changing the number of CPUs. Really strange behaviour. – Maxim 'Zert' Treskin Jan 20 '15 at 13:22
  • I confirm such behavior on vagarant with ubuntu/trusty64 box. – zyxue Mar 15 '16 at 19:37

Here is a (brute force) workaround. This does NOT require you to set the number of CPUs to 1.

Add the following to your init.el (your emacs settings):

(add-hook 'isearch-update-post-hook 'redraw-display)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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