GNU bug report logs - #24153
25.1; Feature request: per-buffer cursor-color variable

Previous Next

Package: emacs;

Reported by: Tej Chajed <tchajed <at> mit.edu>

Date: Thu, 4 Aug 2016 15:28:02 UTC

Severity: wishlist

Found in version 25.1

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Tej Chajed <tchajed <at> mit.edu>, npostavs <at> users.sourceforge.net
Cc: 24153 <at> debbugs.gnu.org
Subject: bug#24153: 25.1; Feature request: per-buffer cursor-color variable
Date: Fri, 05 Aug 2016 18:37:11 +0200
>>> Evil emulates a per-window cursor color in order to have the cursor
>>> color of the active window reflect the buffer state (eg,
>>> distinguishing insert and normal mode). It does so by advising
>>> set-window and calling set-cursor-color if necessary; this can lead to
>>> slowdowns when code calls set-window repeatedly (eg, through
>>> with-selected-window).
>>
>> There's no `set-window' function, did you mean `select-window'?
>
> Yes, my mistake - the advice is on select-window.
>
>>
>> Perhaps using ‘buffer-list-update-hook’ instead of advising
>> `select-window' would help?
>
> I haven't fully debugged this alternative, but it doesn't seem to
> work. company-coq still uses save-window-excursion in
> company-coq-ask-prover, which triggers the buffer-list-update-hook.

Please tell us more about where and why ‘buffer-list-update-hook’
doesn't work in any of your use cases.  From what you say here you
expect ‘save-window-excursion’ to _not_ run ‘buffer-list-update-hook’.
Is that correct?

> In
> addition, even with company-coq disabled this somehow doesn't call
> evil-refresh-cursor enough; starting from insert mode, after the first
> proof command, the color gets stuck on the normal mode color, and then
> doesn't change until some other buffer list update.

But IIUC you do not set the buffer of any window in these steps, so why
would you expect ‘buffer-list-update-hook’ to run?

martin






This bug report was last modified 9 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.