Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

share|improve this answer
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 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)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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