开发者

Unexpected colors with solarized dark theme on emacs (blue background)

I have set my iterm2 to use the solarized color theme:

Unexpected colors with solarized dark theme on emacs (blue background)

I would also like to have emacs use this theme. Here's what it looks like:

Unexpected colors with solarized dark theme on emacs (blue background)

I have my terminal set 开发者_如何学Pythonto xterm-256color. I don't know what I've missed, but it makes me sad.

Help appreciated.


It turns out that the official (or officially endorsed) soliarized git repo has a version that is less good than this one.

I switched to the latter and it fixed the issue.


You want to use the default background color set in iTerm2 itself. The problem is, you also have emacs setting the default background color (which overrides iTerm's default)!

If you remove the command changing the background color, it should return to iTerm2's default.

You most likely have something like the following in your .emacs:

(custom-set-faces  '(default ((t (:background "blue"))) t))

To use the Terminal's default background color, do not set the ":background" attribute at all. Note that setting it to black will NOT always work correctly (though in your case it probably will)!

I use gnome-terminal with transparency, and setting the default ":background: black" made the window completely opaque. I had to remove the ":background" setting in order to get my transparency back.

You can still set the default ":foreground" attribute and it will work; just don't set ":background" (did you get that? maybe I should repeat it again. :) ) so you keep your Terminal default background!


Use only the solarized theme in your iTerm configuration and not in your console emacs.


For me the problem was having a gaudy dark green background colour on terminal emacs:

Unexpected colors with solarized dark theme on emacs (blue background)

I fixed it by changing the background colour from #272822 to #222222. For some reason iTerm2 and/or command line emacs/aquamacs changes the very mildly green background colour into gaudy dark green hue.

(custom-set-variables
  '(default-frame-alist
      '((background-color . "#272822")
        (background-mode . dark))))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜