2

Emacs 24.3.1, OS: Linux Slackware 14.1.

In my ~/.bash_profile file I have the following:

# If on console, change cursor colour according to
# /usr/src/linux/Documentation/VGA-softcursor.txt
# Reset using echo -e '\033[?2c'
if [ $TERM = 'linux' -a $SHELL == '/bin/bash' ] ; then
    echo -e '\033[?17;0;64c'
fi

This makes cursor non-blinking and makes it red. When I start Emacs the cursor becomes a blinking dash.

In Displaying the Cursor chapter I read this:

On a text terminal, the cursor’s appearance is controlled by the terminal, largely out of the control of Emacs. Some terminals offer two different cursors: a “visible” static cursor, and a “very visible” blinking cursor. By default, Emacs uses the very visible cursor, and switches to it when you start or resume Emacs. If the variable visible-cursor is nil when Emacs starts or resumes, it uses the normal cursor.

So in ~/.emacs I wrote:

(setq visible-cursor nil)

And restarted Emacs. But it didn't help: the cursor is still blinking, and when I close Emacs it destroys my previous non-blinking cursor.

How to fix?

3
  • How about disabling the global blink-cursor-mode with: (blink-cursor-mode -1)
    – lawlist
    Dec 1, 2015 at 23:15
  • @lawlist No, doesn't work. I have also tried (blink-cursor-mode 0) and (blink-cursor-mode nil). Must be for the graphical mode.
    – user4035
    Dec 1, 2015 at 23:32
  • 1
    I think in terminal Emacs has no control over the cursor... You gotta change terminal settings.
    – xuhdev
    Apr 16, 2016 at 10:16

1 Answer 1

2

This is an old question but I ran to this issue just today, in Debian 10. Terminals used are Konsole in Debian on the metal and wsltty in WSL.

For me setting visible-cursor variable to nil worked. The cursor stopped blinking in terminal Emacs. Outside of Emacs, the cursor was not blinking anyway since that's what I had configured. blink-cursor-mode was off already too.

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.