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.bugs Subject: bug#42552: 28.0.50; Overlay 'face' property doesn't set the "underlying face" for 'after-string' Date: Thu, 30 Jul 2020 17:04:12 +0300 Message-ID: <83wo2ldrqb.fsf@gnu.org> References: <46466541-6185-2bf3-87cc-b28c71fe69e7@yandex.ru> <838sf6gkvq.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42552@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 30 16:05:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1k19BG-0004sE-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jul 2020 16:05:10 +0200 Original-Received: from localhost ([::1]:33486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k19BF-0003jG-Gf for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jul 2020 10:05:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k19B8-0003j4-BC for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2020 10:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k19B8-0002vX-0n for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2020 10:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k19B7-00040E-Pu for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2020 10:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jul 2020 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42552 X-GNU-PR-Package: emacs Original-Received: via spool by 42552-submit@debbugs.gnu.org id=B42552.159611788015355 (code B ref 42552); Thu, 30 Jul 2020 14:05:01 +0000 Original-Received: (at 42552) by debbugs.gnu.org; 30 Jul 2020 14:04:40 +0000 Original-Received: from localhost ([127.0.0.1]:36452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k19Al-0003za-Kr for submit@debbugs.gnu.org; Thu, 30 Jul 2020 10:04:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k19Ah-0003zK-GX for 42552@debbugs.gnu.org; Thu, 30 Jul 2020 10:04:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38487) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k19Ac-0002s9-1S; Thu, 30 Jul 2020 10:04:30 -0400 Original-Received: from [176.228.60.248] (port=4220 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k19Ab-0004ED-FX; Thu, 30 Jul 2020 10:04:29 -0400 In-Reply-To: (message from Dmitry Gutov on Sun, 26 Jul 2020 23:00:57 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183705 Archived-At: > Cc: 42552@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 26 Jul 2020 23:00:57 +0300 > > On 26.07.2020 22:02, Eli Zaretskii wrote: > > I'd like a recipe for reproducing the problem and the description of > > what exactly constitutes the problem, if possible. > > The recipe is similar to > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38563#11. > > The only difference is one needs to initiate completion 10 lines above > the lines which `whitespace-mode` highlights with red. Thanks. > 1. Apply the patch to company.el. > 2. Launch 'emacs -Q -L path/to/company -l company'. > 3. Turn on company-mode and whitespace-mode. > 4. In the scratch: > C-u 11 M-x newline > space space space > C-u 11 M-x previous-line > Type 'c', then M-x company-complete-common I installed a fix on master. The fix is simple enough, but it is in code that is used in all cases where faces are used in overlay strings, and so I don't want to install this on emacs-27, since the Emacs 27.1 release is imminent, and I don't want to delay it any longer. We could discuss later whether to backport to Emacs 27.2. > The solution I hoped would fix this, which we discussed in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38563#60, does not work > when the popup is rendered with 'after-string' instead of 'display' > overlay property (and a similar problem exists for 'before-string' as > well). Hence the title of this bug report. Setting the 'face' property of an overlay with the intent of affecting the display of an overlay string never worked in Emacs, and the comments to the code even mention it (note the last sentence): /* Return the face ID at buffer position POS for displaying ASCII characters associated with overlay strings for overlay OVERLAY. Like face_at_buffer_position except for OVERLAY. Currently it simply disregards the `face' properties of all overlays. */ int face_for_overlay_string (struct window *w, ptrdiff_t pos,