From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Foreground color opacity Date: Mon, 11 Sep 2023 17:04:24 +0300 Message-ID: <838r9crel3.fsf@gnu.org> References: <83fs3krhmi.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2676"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Filippo Argiolas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 11 16:05:52 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfhXz-0000Sz-4b for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Sep 2023 16:05:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfhXC-0002pN-Bs; Mon, 11 Sep 2023 10:05:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfhX9-0002on-IR for emacs-devel@gnu.org; Mon, 11 Sep 2023 10:04:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfhX9-00063e-9s; Mon, 11 Sep 2023 10:04:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3YQ6oXnnQhowdZ6GoOwYVNlCBMGojr+DpPFKtWwZoHI=; b=QpEKtxNmSE9f tOPtxysujnXUFzPAuxDlNEGJhQGBejhprcC4+Gk+1ZHKzuzz0Ec2ojT6ubeLZYf4uajqJWaRYg+Vq 4GqxEbJe74UDS4V8iBq6TbUZ6+3K7wlGezw8anJvmuYVIDp1WoTN+t8W3NFipDizlkP2JbW4jbhsf rVdcrG8gaBufbxH0aCgzk0hkQSK71KIIGPP/tfD01omPJ3HRn8a3ngdC3xRKeFuGwwrz3/9KmxGpl nEE5lPHhZ3EB575dxlnZYSed7DE+eQsWZVc49/5o1NWmMduR20GuVmExMhmZKIULDDoK2tGxb6NIL CxEuje65wjG8P8zI9otbhw==; In-Reply-To: (message from Filippo Argiolas on Mon, 11 Sep 2023 15:09:45 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310468 Archived-At: > From: Filippo Argiolas > Date: Mon, 11 Sep 2023 15:09:45 +0200 > Cc: emacs-devel@gnu.org > > > Why not cover the "inactive" portion with an overlay which has the > > 'face' (or font-lock-face) property that specifies only the opacity? > > That is IMO simpler and doesn't need to run any functions after > > fontifications. > > > > (Caveat: I didn't actually try this approach, so maybe I'm missing > > something.) > > > > Thanks. > > That would be the perfect solution, but as far as I can tell we don't > have an opacity face attribute, do we? Too bad. (The alpha parameter is what I had in mind , but I see now that it's only supported for the entire frame, not for a single face.) Anyway, it sounds inelegant that we need to jump through such hoops to achieve such a simple effect. It could even be a problem, if some Lisp program expects to find the font-lock faces in a buffer, but instead sees your special faces which replaced them. E.g., don't we have features that detect strings and comments in code by looking for their respective font-lock faces?