3

I've started to use emacs (about few days). Also I read this topic: Color themes are strange/incorrect in terminal emulator but I still have issues.

What I did:

  1. export TERM="xterm-256color"
  2. Download and successfully installed color-theme package
  3. Download and successfully (I think) installed solarized theme from https://github.com/sellout/emacs-color-theme-solarized.git
  4. updated init.el:

    ;;; ============= SOLARIZED ================
    (add-to-list 'load-path "~/.emacs.d/color-theme")
    (add-to-list 'load-path "~/.emacs.d/color-theme/themes")
    (require 'color-theme)
    (color-theme-initialize)
    (setq color-theme-is-global t)
    (add-to-list 'load-path "~/.emacs.d/emacs-color-theme-solarized")
    (require 'color-theme-solarized)
    (setq solarized-termcolors 256)
    (color-theme-solarized-dark)
    

OS: Debian/KDE4.7/Konsole

Emacs Screenshot

Some color are wrong: 1. include 2. numbers 3. def 4. quotes "

Why this theme displays wrong?

4

1 回答 1

3

如果您从终端运行 Emacs,请确保您的终端模拟器的颜色方案也设置为使用 Solarized 调色板。参考:https ://github.com/sellout/emacs-color-theme-solarized#important-note-for-terminal-users 。官方的 Solarized repo中没有 Konsole 的调色板,但是,还有其他可用的调色板,例如:https ://github.com/phiggins/konsole-colors-solarized 。

如果这仍然不起作用,您可以尝试将终端显式设置为使用 16 种颜色,如下所示:

$ TERM=xterm-16color emacs

我对终端颜色知之甚少,无法解释其工作原理和原因,但我可以确认它确实有效。如果有兴趣,这可能有助于解释一些事情:https ://github.com/seebi/dircolors-solarized#understanding-solarized-colors-in-terminals 。

于 2012-11-30T05:43:01.143 回答