This is a problem I have when using GUI Emacs. I don't have this problem with terminal Emacs.

After starting it, I don't see any cursor.

I've put this at the bottom of my .emacs file

(setq-default cursor-type '(box . 4))
(set-cursor-color "#FF0000")

, but I still have to evaluate that after I start emacs, to be able to see any cursor.

I'd also like it to be a 'block', but I only found 'box' to be working.

Any pointers?;)

2 Answers 2


set-cursor-color applies to the current frame — check its documentation. (What Emacs calls a frame is what most of the rest of the world calls a window.) Depending on the window system, the initial frame object may or may not already have been created when .emacs runs, so your set-cursor-color call will either apply only to the initial frame, or have no visible effect.

To make it apply to all frames, set the cursor-color parameters in the default frame parameters list.

(setq default-frame-alist `((cursor-color . "#FF0000")

As for the cursor type, the documentation mentions (box . size) as an option, but this was added in Emacs 28.1. In Emacs 27.2 on Linux with Xaw or GTK, setting cursor-type to an unsupported value doesn't result in any error and seems to be equivalent to hollow. So I guess you'll have to settle for plain box or for (bar . 4) until you upgrade.

  • Yup, thanks;) that solved it;). For the other part, a block is a solid block, vs what I see now is a hollow box, so it's not filled. It's like an inactive cursor, but it's actually active. Having it like this makes both inactive and active cursor have the same look, so hard to distinguish. Apr 18, 2022 at 18:33
  • @JasonHunter I see, so you want box but you're getting hollow. Well, I guess that's because your Emacs is too old and doesn't support (box . WIDTH) — I've updated my answer. Apr 18, 2022 at 18:47
  • Great; thanks;) I upgraded and now it's all aok;) Thanks Apr 18, 2022 at 20:56

I see what you did there. :-)


(setq make-pointer-invisible nil)
  • I don't think the OP is talking about the pointer.
    – NickD
    Apr 18, 2022 at 18:54
  • You're right. Ho hum. Apr 18, 2022 at 20:13

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.