In Emacs color-theme libraries, which items control the visual selection foreground and background?
I'm in the process of giving Emacs a try after many years of Vim use. The vim emulator, Evil, is working imporessively well for me but I'm having trouble with visual selection highlighting. The problem seems to be with my chosen color theme rather than with Evil. I say this because if I comment out the the theme I can see the selected text properly highlighted, but not with my chosen theme which is a port of the ir-black them I use in Vim.
I got the theme from https://github.com/jmdeldin/ir-black-theme.el/blob/master/ir-black-theme.el
Here's the section in my .emacs file that loads Evil and the theme.
;Enable "Evil", the Vim emulation package
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
(line-number-mode t)
(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-ir-black)
I've searched color-theme-ir-black.el for "visual" and find only the following lines that seem possibly relevant.
;;visual selection: #1D1E2C
(region ((t (:background "#1D1E2C"))))
(speedbar-file-face ((t (:foreground "#1D1E2C"))))
FWIW, I'm running GNU Emacs 24.4.1 on OS X 10.9.5
color-theme
? Starting from 24, emacs has a built-in color theme manager, which is whatir-black-theme
in your link is using. So you load it with(load-theme 'ir-black)
(and add its path tocustom-theme-load-path
). Does doing this address the problem at all?evil
and can confirm thatregion
is what controls the visual selection you're describing.ir-black
in the link that you posted is not an old-style color-theme, you are doing something strange, I think. Try this: remove all mentions tocolor-theme
, download the link you posted (ir-black-theme.el
) into~/.emacs.d
, and run(load-theme 'ir-black)
. I thinkcolor-theme
is obsoleted by Emacs's custom themes.color-theme
package, especially not in combination withload-theme
. Get rid of that part of that config and see whether that's it.