Cursor color in "Emacs state" not persistent
Hi, I found that being able to set cursor color in different state is really useful, so I have the following to set my cursor color in emacs state: (setq evil-emacs-state-cursor '("red" box)) and it works, however, after I pressed "C-h k <key>" in emacs state the cursor color went back to black. Thanks, York
On 2011-08-03 11:39 +0200, York Zhao wrote:
I found that being able to set cursor color in different state is really useful, so I have the following to set my cursor color in emacs state:
(setq evil-emacs-state-cursor '("red" box))
and it works, however, after I pressed "C-h k <key>" in emacs state the cursor color went back to black.
Emacs allows only one cursor color per "frame" (i.e., window), so the best I can do is to ensure that the color is determined by the current buffer (commit 03004f7). If you have two buffers open, then the inactive buffer's cursor will also change color, unless you disable inactive cursors altogether by setting `cursor-in-non-selected-windows' to nil. The cursor /type/ (box, hollow, bar, etc.), on the other hand, is fully buffer-local. -- Vegard
Previously the "wrong" cursor color remains even after having closed the other buffer, but anyways, it is working perfect now. As long as I'm getting the correct cursor color after the inactive buffer becomes active that should be more than enough and we shouldn't complain.
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"? 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. York On Wed, Aug 3, 2011 at 10:20 AM, Vegard Øye <[email protected]> wrote: On 2011-08-03 11:39 +0200, York Zhao wrote:
I found that being able to set cursor color in different state is really useful, so I have the following to set my cursor color in emacs state:
(setq evil-emacs-state-cursor '("red" box))
and it works, however, after I pressed "C-h k <key>" in emacs state the cursor color went back to black.
Emacs allows only one cursor color per "frame" (i.e., window), so the best I can do is to ensure that the color is determined by the current buffer (commit 03004f7). If you have two buffers open, then the inactive buffer's cursor will also change color, unless you disable inactive cursors altogether by setting `cursor-in-non-selected-windows' to nil. The cursor /type/ (box, hollow, bar, etc.), on the other hand, is fully buffer-local. -- Vegard _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Wed, Aug 3, 2011 at 18:11, York Zhao <[email protected]> wrote:
Previously the "wrong" cursor color remains even after having closed the other buffer, but anyways, it is working perfect now. As long as I'm getting the correct cursor color after the inactive buffer becomes active that should be more than enough and we shouldn't complain.
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"? 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.
I’ve contributed very little, but you’re welcome :-). I agree that Evil is shaping up to be something very, very nice. It has a much simpler, much easier to follow, design than Viper(+Vimpulse) and I think that it has the potential to be something beyond Emacs or Vim, something even better than either of those two editors. So, keep up the great work, Vegard! It’s greatly appreciated. I wish I’d have time to contribute more.
I think that it has the potential to be something beyond Emacs or Vim, something even better than either of those two editors.
I believe combining Emacs and Vi is the king, absolutely better than either one of them and I actually don't understand why the "Editor war" in the first place. To me, the answer is simple: Use both. York On Wed, Aug 3, 2011 at 12:36 PM, Nikolai Weibull <[email protected]> wrote: On Wed, Aug 3, 2011 at 18:11, York Zhao <[email protected]> wrote:
Previously the "wrong" cursor color remains even after having closed the other buffer, but anyways, it is working perfect now. As long as I'm getting the correct cursor color after the inactive buffer becomes active that should be more than enough and we shouldn't complain.
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"? 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.
I’ve contributed very little, but you’re welcome :-). I agree that Evil is shaping up to be something very, very nice. It has a much simpler, much easier to follow, design than Viper(+Vimpulse) and I think that it has the potential to be something beyond Emacs or Vim, something even better than either of those two editors. So, keep up the great work, Vegard! It’s greatly appreciated. I wish I’d have time to contribute more. _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
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
Thanks Vegard York On Thu, Aug 4, 2011 at 8:40 AM, Vegard Øye <[email protected]> wrote:
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
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
participants (3)
-
Nikolai Weibull -
Vegard Øye -
York Zhao