-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual indicator not always correct #24
Comments
Hi! Sorry that I haven't replied here, must have forgotten about it. To be honest I don't know why the visual indicator sometimes doesn't work. The check for it is used in In the case of Magit I've done some research. The function
If I try and comment out this, it seems like the cursor color switching works. @tarsius Do you know why |
No lisp code should ever call |
@tarsius Yes ofcourse. I just find it strange that the quoted code somehow has the effect that |
I strongly doubt that it has that effect. In fact pressing |
@tarsius I'm using the latest version of Magit when testing, so I suspect that |
It's not only magit's behavior that is affected. I can't provide additional examples until Monday unfortunately. |
There's no rush :) But please see if you can give other examples and perhaps I can try to see if there's a common factor among them. |
Another case: I'm in ryo, I open a file (counsel-find-file) that doesn't have ryo hook enabled and the indicator is still red, but ryo-mode is off (until I press any key, then it's updated). |
I also get this bug. Unfortunately I don't know how to fix it. One "solution" could be to use a different cursor for RYO, for instance like this:
|
Perhaps that should be the out-of-the-box behavior, since it's the only correct one. Fixes magit issues as well, btw. |
I have the same issue, but the use of a different cursor indeed fixes it. |
I really liked the result I had achieved. However I found out that calling post-command-hook isn't a good idea (github.com/Kungsgeten/ryo-modal/issues/24#issuecomment-521966076) and since I don't know what else I could use to enforce the cursor changes, I'm removing the entire code and will rely on just cursor color instead (I don't want to change the cursor shape). At least after some thought I managed to think of a good color that fits with my theme.
I'm not sure if it covers all the cases but here's something I've discovered:
Now if I add the following to my init.el: (defun foobar ()
(when ryo-modal-mode
(ryo-modal--cursor-color-update)))
(add-hook 'buffer-list-update-hook 'foobar) the color of the cursor is changed as expected as soon as shell command ends. I don't know any major disadvantages of this approach though. |
Thanks @BlankSpruce. It's been a few years and I've gotten used to only caring about the shape of the cursor, which I've customized to be vim-like (thin on insert mode, i.e. ryo-modal-off). This has been working fine. All in all my Emacs setup has matured a little bit and i don't change packages and config too often anymore. Ryo-modal has retained it's spot as one of the most important packages in my configuration, kudos @Kungsgeten ! |
Visual indicator (red cursor) is not working on startup of emacs. Also when switching/killing buffers I frequently mistakenly get white cursor for when I'm in fact in the ryo mode.
One clear example is:
My use-package config hooks regarding which modes have ryo enabled by default are as follows (and I don't want to add magit popup to that as it has it's own set of single letter shortcuts):
:config (add-hook 'text-mode-hook #'ryo-modal-mode) (add-hook 'prog-mode-hook #'ryo-modal-mode) (add-hook 'fundamental-mode-hook #'ryo-modal-mode) (add-hook 'conf-unix-mode-hook #'ryo-modal-mode)
Thank you for all the work you've put into developing this package. I'm using it for a few months now and my config grew up to 150 lines of shortcuts. I like it a lot and I really don't feel like switching, but not knowing if I'm in the ryo mode or not at a glance makes it sometimes cumbersome to use.
The text was updated successfully, but these errors were encountered: