0

I'm using Emacs 27.2 on macOS 10.13.16 from the railwaycat build. I set my cursor color to a red color using

(set-cursor-color "red")

As soon as I type controlg, the cursor color reverts to black. Investigating the code executed by that key binding, which is keyboard-quit in simple.el, I find that the command that causes the color reset is signal, an Emacs built-in.

Why does this happen, and how can I get Emacs to stop changing my cursor color?

Drew
  • 75,699
  • 9
  • 109
  • 225
mhucka
  • 163
  • 6
  • 1
    I can't reproduce this on 28.0.50. Have you tried starting from `emacs -Q`? https://emacs.stackexchange.com/questions/28429/how-do-i-troubleshoot-emacs-problems – Tyler Jun 10 '21 at 17:49
  • I should have tried that, but it's still a mystery. It does _not_ happen with `-Q`, so it must be something in my configuration, but I'm at a loss about what it could be. The problem occurs if I invoke `(signal 'quit nil)` directly, and `signal` is a built-in C function. I guess the next step is to understand what `signal` is doing, and work backwards to understand how that's entangled with whatever I'm doing. – mhucka Jun 17 '21 at 02:24
  • I would just bisect your file to narrow down your search to the exact line of code that causes the problem to occur. It's unlikely to be something as low level as a built-in C function; if it was, there would be a lot of people encountering this problem. – Tyler Jun 17 '21 at 02:52
  • Yes, thanks. I actually have a lot of experience with debugging .emacs files, but mine is very long (I'm a long-time Emacs user), so it's a time-consuming chore. Regarding the nature of the problem: I thought it might be due to the particular macOS Emacs build since AFAIK it started happening when I switched to it. That's what prompted the question. But I didn't investigate enough before posting. Mea culpa. – mhucka Jun 17 '21 at 03:57

0 Answers0