Skip to main content
11 events
when toggle format what by license comment
Feb 12 at 14:19 comment added NickD I created a chat room to continue this discussion (and maybe get a resolution to the OP's problem). There are far too many comments here for comfort.
Feb 12 at 14:09 comment added NickD What I was saying is that it depends on the capabilities of the terminal (or terminal emulator). The terminal is in charge, not Emacs. But if you can change cursor properties by hand (e.g. by sending some string to the terminal), then you can teach Emacs how to change them too. But that's not the point: the point is that e.g. (set-cursor-color "red") does not work in the terminal: you might be able to change the cursor color but you have to do it some different (and terminal-dependent) way.
Feb 12 at 4:38 comment added Philippe Carphin You say emacs is powerless to change the cursor color in the terminal but researching stuff for this, I came across a solution to change the cursor in the terminal. My cursor changes color depending on my evil-state in the terminal now. I didn't think that was possible but I made it work in a barely hackish but reliable way. I'm honestly very excited by this!
Feb 12 at 3:04 comment added NickD Thanks for checking.
Feb 12 at 0:08 comment added Philippe Carphin @NickD My work laptop is on Windows 11 and has Emacs 27.1 on it and the code you describe works the same there as the Emacs 29 that I have on the Linux cluster.
Feb 10 at 22:03 comment added NickD The only thing I can think of is that Emacs 27.2 does not support these things, but I will not downgrade that far to test that. But searching through git logs, the last mention I find of blink-cursor-mode was in the Emacs 26.1 time frame. So I think that it is unlikely that 27.2 is the cause (although you might want to upgrade). I think you are doing something wrong, but I cannot venture a guess as to what.
Feb 10 at 21:59 comment added NickD I have now tried Emacs 29.4 on Windows 11 and I cannot reproduce any of your findings (even without -Q but without a personal init file). (blink-cursor-mode +1) turns on blinking, (blink-cursor-mode -1) turns it off, (setq cursor-type 'bar) turns it into a bar cursor, (setq cursor-type t) goes back to the (default) box cursor, (set-cursor-color "blue") turns the cursor blue. The only thing I changed was to make the blinking permanent: by default, after ten blinks, it stop blinking and you get a solid cursor. I customized the entry Blink Cursor Blinks and set it to 0.
Feb 10 at 17:51 comment added user46811 checking the blink-cursor-mode returns: blink-cursor-mode is a variable defined in ‘frame.el’. Its value is t However the cursor is unblinking. Sometimes I need to edit code on my laptop which is why I have emacs installed there.
Feb 10 at 17:42 comment added user46811 I have GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 installed on a new win11 laptop. I did not have this problem with my previous win10 laptop, and I do not have this problem when using the same .emacs file on a linux server . I invoked emacs with the -Q option and evaluated (setq cursor-type 'box) and it returned the value of box, even through the cursor is a non-blinking vertical line. If I do C-h v cursor-type I get the following: cursor-type is a variable defined in ‘C source code’. Its value is ‘box’ Original value was t Local in buffer scratch; global value is t
Feb 10 at 17:04 history edited NickD CC BY-SA 4.0
added 194 characters in body
Feb 10 at 16:54 history answered NickD CC BY-SA 4.0