From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Temporarily overriding cursor color? Date: Thu, 05 Feb 2015 18:58:54 +0200 Message-ID: <83wq3we1m9.fsf@gnu.org> References: <87wq3wzf1t.fsf@fencepost.gnu.org> <83386kfi1n.fsf@gnu.org> <87lhkcz56v.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423155568 31095 80.91.229.3 (5 Feb 2015 16:59:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2015 16:59:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 05 17:59:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJPly-0001rR-Tf for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2015 17:59:23 +0100 Original-Received: from localhost ([::1]:43169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPly-0001Ka-6C for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2015 11:59:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPlq-0001JM-Ul for emacs-devel@gnu.org; Thu, 05 Feb 2015 11:59:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJPln-0007Bn-3M for emacs-devel@gnu.org; Thu, 05 Feb 2015 11:59:14 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:35953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPlc-0007AI-S5; Thu, 05 Feb 2015 11:59:01 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NJB005005JNL600@mtaout28.012.net.il>; Thu, 05 Feb 2015 18:57:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJB00MG05RCNO80@mtaout28.012.net.il>; Thu, 05 Feb 2015 18:57:12 +0200 (IST) In-reply-to: <87lhkcz56v.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182461 Archived-At: > From: David Kastrup > Cc: emacs-devel@gnu.org > Date: Thu, 05 Feb 2015 17:36:08 +0100 > > > 'cursor' is not really a face used by the Emacs display. It's more > > like a handle to inject the 'cursor-color' parameter into a frame's > > parameter alist. And there's no code to do that when you remap the > > 'cursor' face, so the above has no effect. > > > > By contrast, when you use (for example) set-face-background to change > > the 'cursor' face, that function eventually calls > > get_lface_attributes, which handles this face specially, see there. > > But that happens per-frame rather than per-buffer. I didn't mean that set-face-background can replace face remapping. I just explained how come set-face-background succeeds in changing the cursor colors, while face remapping doesn't. > The question is whether my expectations here were unreasonable or > whether it would be unreasonably expensive to match them. I wouldn't say "expensive", but the changes in code will be more than just call a function in face-remap-add-relative or some such. You need to plug in face lookup into the code that draw the cursor.