unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tej Chajed <tchajed@mit.edu>
To: npostavs@users.sourceforge.net
Cc: 24153@debbugs.gnu.org
Subject: bug#24153: 25.1; Feature request: per-buffer cursor-color variable
Date: Thu, 4 Aug 2016 22:17:04 -0400	[thread overview]
Message-ID: <CAFCzHYae0+QPiidAqwf8hkbJBsZGjGrwP9ozXZnMkf0TpwwE9w@mail.gmail.com> (raw)
In-Reply-To: <87d1lo9fjm.fsf@users.sourceforge.net>

On Thu, Aug 4, 2016 at 9:21 PM,  <npostavs@users.sourceforge.net> wrote:
> Tej Chajed <tchajed@mit.edu> writes:
>>
>> 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. 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.





  reply	other threads:[~2016-08-05  2:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 15:08 bug#24153: 25.1; Feature request: per-buffer cursor-color variable Tej Chajed
2016-08-04 17:13 ` Eli Zaretskii
2016-08-05  1:21 ` npostavs
2016-08-05  2:17   ` Tej Chajed [this message]
2016-08-05 16:37     ` martin rudalics
2016-08-06  2:10     ` Clément Pit--Claudel
2016-08-05  2:49   ` Clément Pit--Claudel
2016-08-05 16:37     ` martin rudalics
2016-08-06  1:59       ` Clément Pit--Claudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFCzHYae0+QPiidAqwf8hkbJBsZGjGrwP9ozXZnMkf0TpwwE9w@mail.gmail.com \
    --to=tchajed@mit.edu \
    --cc=24153@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).