emacs - first character of each line starts at end of window

293 views Asked by At

I installed Solarized for the Terminal application in Mac OSX 10.9.5. It works great, except I now have a problem with Emacs.

Specifically, when I edit a python file in Emacs, if a line appears after a commented line, its first character appears at the end of the window. This line then continues on the next line of the Terminal window. So it looks something like this:

# comment 1
                                             F
irst line
Second line
# comment 2
                                             T
hird line
# comment 3
                                             F
ourth line
Fifth line
Sixth line

This makes editing the file really difficult. There are also other problems. For example, when I try to edit what appears to be the second line, Emacs will actually edit the third line. The visual feedback does not seem to match the actual text.

I've tried googling to figure out what the problem is, but I can't find anything. I don't even know where to start. If anyone can give advice, I'd really appreciate it. Thanks!

On a side note: I have the same problem for GNU Emacs 21.4.1 and GNU Emacs 23.1.1.

2

There are 2 answers

0
lish On

So I had this same problem, and after experimenting around with a couple different things, I found the following solution:

Go to Preferences -> Profiles -> Solarized Dark/Light -> Advanced. In the "Terminfo" section, change from "ansi" to "xterm-256color". This works for me with both Solarized Dark and Light.

0
slinberg On

Another thing to check, for each theme, is whether your character spacing is set to something other than 1.

Look in Preferences -> Profiles -> Text -> Font (click "Change..." button). If your character spacing is something like 1.004, or 0.996, set it to exactly 1, close the open window(s), and open a new window for the profile you changed. It fixed this problem for me on OSX 10.11.1.