1

I use Emacs a lot including for most terminal sessions. One of activities includes typing git commands inside a shell buffer.

I found a very interesting color puzzle. After downloading forked repository https://github.com/yaitskov/java-nio-tcp-proxy I encountered that new lines which should be green are blank. And only deleted lines are visible (in red color). It was a big surprise for me because I did it a lot of times with different repositories.

After trying different combinations there are facts:

git diff --color works well in other existing and new GIT repositories in Emacs shell, Emacs term, Emacs ansi-term and gnome-terminal.

git diff --color works well for any GIT repo in Emacs term, Emacs ansi-term and gnome-terminal.

Not all files in the repo have the bug. But most of them do (java files, pom.xml).

But green lines are visible for config.properties.

I aware that a shell buffer is not 100% terminal. But I'm thrilled by this instability.

  • Try changing the color theme. – Malabarba Dec 13 '14 at 13:36
1

It seems to me that it only happens on files with DOS line endings. The carriage return at the end is apparently messing with the rendering of those lines in shell-mode.

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.