Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 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 Commented Feb 10 at 17:42
  • 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. Commented Feb 10 at 17:51
  • 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. Commented Feb 10 at 21:59
  • 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. Commented Feb 10 at 22:03
  • 1
    @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. Commented Feb 12 at 0:08