From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#71282: 30.0.50; hl-line overlay priority has no affect Date: Sun, 30 Jun 2024 17:37:52 +0100 Message-ID: References: <87plt3lyvd.fsf@kisara.moe> <8634pyr0w8.fsf@gnu.org> <878qymd5ce.fsf@kisara.moe> <86a5j2hb6j.fsf@gnu.org> <875xtqczuu.fsf@kisara.moe> <867ce6h4iq.fsf@gnu.org> <865xtqh2b7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25587"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mohkale@kisara.moe, 71282@debbugs.gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 30 18:38:25 2024 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 1sNxZF-0006HR-Vx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jun 2024 18:38:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNxYx-0001VB-QJ; Sun, 30 Jun 2024 12:38:03 -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 1sNxYw-0001UB-Ac for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 12:38:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNxYv-0004en-Rt for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 12:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNxYv-0003oh-P9 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 12:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2024 16:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71282 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 71282-submit@debbugs.gnu.org id=B71282.171976547814660 (code B ref 71282); Sun, 30 Jun 2024 16:38:01 +0000 Original-Received: (at 71282) by debbugs.gnu.org; 30 Jun 2024 16:37:58 +0000 Original-Received: from localhost ([127.0.0.1]:58831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNxYr-0003oO-Vo for submit@debbugs.gnu.org; Sun, 30 Jun 2024 12:37:58 -0400 Original-Received: from mail-lf1-f52.google.com ([209.85.167.52]:54514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNxYq-0003oB-QV for 71282@debbugs.gnu.org; Sun, 30 Jun 2024 12:37:57 -0400 Original-Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52ce01403f6so2495584e87.0 for <71282@debbugs.gnu.org>; Sun, 30 Jun 2024 09:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719765410; x=1720370210; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ssW6NrU68b6AsSBtNx253vhrzsXWBt7RvOtIF4C8dec=; b=JVFFpBB75aoCE4GGO23eHPllpAfE7XNMj7jfgLOE1qY7nTupMaUi6Lmy6vqgsJ2B6U L32oMekmptH3HK757VhC8mQwgL03IuVRsJj9NfdpQ24f7a1hqEDE4efRLr9XRf4GKhTg SXPGgo2iw2I1qjFp32zOBBHTSckU75IZpNlQAfAEZ4vazQ1Of3hER/1gLOrYJGYOBDNv sl31q141qjYqDLC4aP8DBTa0qNDxXpZCR/LhSeQ0tAeVJ371RTz0M7EaaMmWrfEc3t2B fmLV1w1D9xiS5lF49GRAMjArVmDMo0EkKm/xDegz3+9Ar7bWGRug6tqmw4vsJztyyijC Qu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719765410; x=1720370210; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ssW6NrU68b6AsSBtNx253vhrzsXWBt7RvOtIF4C8dec=; b=oLkvkHTV5zZ8CGci/TiGNH6/Uz69mx+2tvPr/S1BPE5WtGZSDg79woD97E/F+ftTJY 8fgP4BZlGwUX/9ur/KvQfMqtJZ2EcoogOHCTDIM2Mq0SooqRh8nRRzYFlS92kRC+5A+A 57XZJS2WVzt6lFVbd4hBfAY7Xir6Vr22TeaONFf/pFgtNVzZMilvgVOQbQDGVG2T2eAI DH+UVlzKqDRBdzNq6V7MgpNBixpUUKSUJ/0wtcnUnaWZGG+ex0dx2fTbN0Gqb+V2/BD2 o/HfiIJR1V70XQppkq5ffxtxZneDsaOuFcm9CPjkyKP2r7Ho3V/NbwN4Y+1ze41W0IgY Af8w== X-Forwarded-Encrypted: i=1; AJvYcCXmRQlDWfimilLqIbDb9hQylCikhdqaAg6dfNEAoo4VfugOOtcy+pxwnVPwbdGfUDABVihlfa0qVI2djVLM9eQGuZO+yA0= X-Gm-Message-State: AOJu0Ywr6V+wN4KulWon3BXIaBP68jnltpTpDNCT+vLavkEdb6fmZf4A lOc28loaYeey1eozgCREotxveS4SgiAgOJKI9Eo41JxLtYc9xaqNyXhr7WybDu+CaK9S6EGC7Hd RBq2+cLNvjiyVb5sRcQMdWpjYsWE= X-Google-Smtp-Source: AGHT+IF3Zg8hM8p0Trt7+et+CKOT0bAPKAIxD63dINdQrFeedpwuSezRrAZuVusqwp5pxe53Pi05z86LlqqZ8z4kItM= X-Received: by 2002:a05:6512:3993:b0:52c:e030:144e with SMTP id 2adb3069b0e04-52e827016e4mr2360674e87.47.1719765410230; Sun, 30 Jun 2024 09:36:50 -0700 (PDT) In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288207 Archived-At: On Sun, Jun 30, 2024 at 4:50=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > On Sun, Jun 30, 2024 at 4:34=E2=80=AFPM Eli Zaretskii wrot= e: > > > The mechanism exists: find the face of the buffer text, and use it (or > > some of its attributes, like background color) in determining the face > > of the overlay string. > > Then if that mechanism doesn't require anything specific of package X or > Y, it should be possible to condense in a function (that shouldn't live i= n > Eglot, but OK it it starts life there, I guess) that takes a face with > a number of > attributes,merges with whatever is "the face of the buffer text" and retu= rn > an (anonymous) face. If so, then that "mistery" function is the fix > to this issue. > > (overlay-put ov (if peg-after-p 'before-string > 'after-string) > (propertize > text > - 'face (pcase kind > - (1 'eglot-type-hint-face) > - (2 'eglot-parameter-hint-fa= ce) > - (_ 'eglot-inlay-hint-face))= )) > + 'face > + (mistery (pcase kind > + (1 'eglot-type-hint-face= ) > + (2 'eglot-parameter-hint= -face) > + (_ 'eglot-inlay-hint-fac= e))))) Never mind, this won't work as whatever face is determined at any given moment, will cease to be adequate as soon as the hl-line extension chooses another face for those positions. So if no low-level automatic merging of overlay faces is to happen in the display engine, this problem doesn't have a solution. Or maybe hl-line could forcibly and constantly repropertize all the overlays on a given line with a given background color if that attribute isn't explicit in the overlay's faces (main text, before string or after string). Then restore those things it as soon as the line is released. If this idea is not too complicated, too brittle or too inneficient, it is at any rate not something that concerns Eglot. Jo=C3=A3o