4

I have issue changing cursor-type in Emacs 25.3 and 25.2 on Windows. Picture is worth thousand words, so here it is

enter image description here

No customization whatsoever.

I try to change cursor-type to a box directly or via frame parameters and it is always a bar. Even when cursor-type is set to t it is a bar Is there a way to change it ?

6
  • What happens if you type M-x eval-expression RET (setq cursor-type 'box) RET
    – lawlist
    Commented Nov 15, 2017 at 5:07
  • Nothing happens to a cursor, that is for sure. I tried setq, setq-default, set-default, I tried also both default-cursor-type and cursor-type as well as changing it through default-frame-alist parameters.The issue most likely is OS specific, because on Fedora Linux it is a box Commented Nov 15, 2017 at 14:27
  • 1
    Emacs for Windows (GUI version) should work correctly with cursors out of the box. Perhaps the installation is broken. w32term.c (internal components of Emacs) extends all cursor types to Emacs for Windows (GUI version) installations. Consider trying a different build or building your own from source.
    – lawlist
    Commented Nov 15, 2017 at 14:47
  • Do you see the same problem when you start Emacs using emacs -Q and in other modes, in addition to the mode you show here? If not, then bisect your init file to find the culprit.
    – Drew
    Commented Nov 15, 2017 at 15:28
  • @Drew The picture is of emacs started with -Q. No customization. The cursor is bar in all of the windows and modes as far as I can tell. Commented Nov 15, 2017 at 17:15

1 Answer 1

10

It looks like w32-use-visible-system-caret is non-nil. This can happen by default if Emacs detects some application is using the Accessibility API to track the position of the cursor - most commonly screen readers, and screen magnifiers. Such software often relies on the default Windows cursor being used and visible, rather than the customizable internal Emacs implementation of a cursor.

You can manually force this variable to nil in your startup files if you wish to continue using whatever software is triggering this, but have Emacs use its own cursor drawing. The other software may not work well with Emacs in that case however.

2
  • 6
    That's the answer. Once I set w32-use-visible-system-caret to nil it went back to normal. The application in question seems to be Windows Speech Recognition. If emacs starts when this application is running then I get this effect on the cursor. Commented Nov 27, 2017 at 16:50
  • 1
    @EvgeniySharapov, I think for me it was also Speech Recognition. I enabled it because it allows voice commands with a Flight Simulator Addon I use. At some point I notices the cursor change, and I would have never linked the two... Commented Oct 14, 2021 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.