Cursor color in "Emacs state" not persistent

Vegard Øye vegard_oye at hotmail.com
Thu Aug 4 14:40:20 CEST 2011


On 2011-08-03 18:11 +0200, York Zhao wrote:

> On Wed, Aug 3, 2011 at 10:20 AM, Vegard Øye wrote:
>
>> The cursor /type/ (box, hollow, bar, etc.), on the other hand,
>> is fully buffer-local.
>
> Then should I be using "setq-default" instead of "setq"?

The variable `evil-emacs-state-cursor' is not buffer-local, so you
should just use `setq'. The underlying variable which Evil modifies,
`cursor-type', is buffer-local, which is what enables Emacs to
simultaneously display different cursors in buffers that are in
different states.

This is only an issue because of the `cursor-in-non-selected-windows'
setting. If it is nil, then only one cursor is displayed at any time,
and it doesn't matter if the underlying variables are buffer-local
or not.

Unfortunately, it is not possible to change the cursor color when
running Emacs in the terminal (which is where it would be really
useful, since the cursor type is always a box). Or rather, according
to my tests, it /is/ possible to change both the cursor type and color
when running Emacs in a terminal on Windows, but it is impossible to
change either when running in a terminal -- any terminal -- on
Ubuntu Linux. :/

> By the way, after a few days of using Evil I'm pretty happy with it.
> Evil appears to be "cleaner" and more elegant designed than
> Viper+Vimpulse, thanks a lot to your wonderful work Vegard, Frank,
> Nikolai and all the contributors.

You're welcome!

-- 
Vegard



More information about the implementations-list mailing list