Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging Emacs cursor color/interaction with color themes
    text
    copied!<p>Because of <a href="https://stackoverflow.com/questions/2337363/reverse-video-cursor-in-emacs">this bug in Cocoa Emacs</a> using the box cursor obscure the character beneath the cursor, and using the bar cursor with solarized has tended to make me not be able to tell where it is in a sea of text. So I want to have the cursor be a <em>red</em> bar. I thought this would work, in my .emacs:</p> <pre><code>(when window-system (require 'color-theme-solarized) (global-set-key (kbd "C-c l") 'color-theme-solarized)) (case window-system ('ns (progn (defadvice color-theme-solarized (after cursor-more-visible) "change the cursor color so it stands out more" (set-cursor-color "red")) (ad-activate 'color-theme-solarized) (color-theme-solarized 'dark) [...] )) [...]) </code></pre> <p>But the programmatic invocation of <code>color-theme-solarized</code> actually does not change the cursor color. The cursor color <em>does</em> change if I invoke <code>color-theme-solarized</code> interactively (or in the *scratch* buffer with <code>C-xC-e</code>)&mdash;so the advice is being taken, sort of.</p> <p>Adding a <code>(setq default-frame-alist '((cursor-color . "red")))</code> (as suggested <a href="https://stackoverflow.com/questions/4642835/how-to-change-the-cursor-color-on-emacs">here</a>) doesn't seem to help. Just for kicks I tried changing <code>(color-theme-solarized 'dark)</code> to <code>(call-interactively color-theme-solarized)</code>, with no success.</p> <p>How can I get the cursor color to be automatically set to red at startup?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload