I would like to be able to create a new cursor shape, that is, a new possible value for option cursor-type
-- for example an
I
shape. Is there a way to do that, similar to the fringe cursor bitmap?
1 Answer
Option cursor-type
is defined in C code, not Lisp. I'm afraid it's essentially impossible to do what you request (modulo reimplementing code, including C code, and rebuilding Emacs.
And the option choices are pretty much hard-coded in multiple parts of the Emacs Lisp code -- see library cus-start.el
, for example.
That's just for choosing and setting the symbol value of the option. But the code that implements each such choice is likely in the Emacs display engine, which is coded in C.
Your best bet is to request an additional cursor type, using M-x report-emacs-bug
. You can include your bitmap or whatever in the request.
-
1That's great info. I was just trying to re-create the acme editor look with emacs to help my old eyes. The colour theme was kindly provided by someone but I couldn't get a comfortable cursor, as I found the bar too thin to see easily.– DaveCommented Jun 3, 2023 at 6:42
C-h v RET cursor-type RET
. I created a draft proof concept of a new cursor type called aframed_box
, but there was no interest by the Emacs developmental team. There is noI
shaped cursor built-in to the internals, and custom cursor types are not available to the user to create.