From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#71282: 30.0.50; hl-line overlay priority has no affect Date: Sat, 29 Jun 2024 23:10:34 -0700 Message-ID: References: <87plt3lyvd.fsf@kisara.moe> <8634pyr0w8.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="25980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mohsin Kaleem , 71282-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 30 08:12:12 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 1sNnnI-0006aV-4M for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jun 2024 08:12:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNnnC-0005U7-8Z; Sun, 30 Jun 2024 02:12:06 -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 1sNnn9-0005SB-VQ for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:12:03 -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 1sNnn9-0004yj-0z for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNnn8-0002dR-Mc for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 02:12:02 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2024 06:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 71282 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Mail-Followup-To: 71282@debbugs.gnu.org, stefankangas@gmail.com, mohkale@kisara.moe Original-Received: via spool by 71282-done@debbugs.gnu.org id=D71282.171972790310085 (code D ref 71282); Sun, 30 Jun 2024 06:12:02 +0000 Original-Received: (at 71282-done) by debbugs.gnu.org; 30 Jun 2024 06:11:43 +0000 Original-Received: from localhost ([127.0.0.1]:54689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNnmp-0002cb-9H for submit@debbugs.gnu.org; Sun, 30 Jun 2024 02:11:43 -0400 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:58725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNnmm-0002cG-De for 71282-done@debbugs.gnu.org; Sun, 30 Jun 2024 02:11:41 -0400 Original-Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-57d1d614049so2367403a12.1 for <71282-done@debbugs.gnu.org>; Sat, 29 Jun 2024 23:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719727835; x=1720332635; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=Egchm2IFurPZoq47IA44qGtvPpziDfzo6W6aOLW70jc=; b=YItahGykjA5LW7uca/ihARjCbAU7OAPZ/Pj+DuHdnHBcIkc5agVJViQjPmlONTqBXa LtFoOBd7f0b7kxUGeWIHs+qCFTvYGkXQGSfqpd98+CByO7qxvKyvMw0oD9cwTaWwVUWi m5LLfCtb2C9xEgZya37rz794Fx8L09ebFzMSQARVsUP0YWPFIRTuRC9z9ry0C9mYccEG r4DLJae3HG3BMwKJkgOC1d+MOvnHa4Ov+d/6HWOYdR81R430tL3YFJ3wxmylWOlngO4V 6MJb8CVEciCGIyhPw3Rq8kZ/nHisQg66s0Lyq80nVn7ncGzOxkhWHxgojdtBxlL2nExZ uNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719727835; x=1720332635; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Egchm2IFurPZoq47IA44qGtvPpziDfzo6W6aOLW70jc=; b=XOqLxSuQCWCynZosCqyCiyJveLYyS2UQDXPJdmIGlhx4XrSxdyUoXd+arm6oN9BMPw ddrdWcaW8nZoOMvTUPHPZMhnZTYnlR03kenwxJ51o8HacUaHqtY1G0+KMT+FIW+qDLQr aVlGy1FhoYFTq+ZeuMhggRtXvD/miH6E1OotOkclShpuFFfFWHq7tRlygXGModf+d/H0 GT9kzRSijD1BxDwI9a/o4zc2TBn+5iMIYHqZWwQhyYdkNYZJfXs6E0kGOHrTZtVVeT+/ xQmdNnT5mvx8AVy9YUxjLM/eCbgIykzcHZCC0fDAyR3joDAE1YZk6+c2Jtfzx6O/jFO4 XohA== X-Forwarded-Encrypted: i=1; AJvYcCWJceQAhwCwgco1r71+R72q9guluLESseW9Z/aEaa0Muv1dE5d5reRnLk25S/36zx+zy7GAaaKDvrW00rFqD72ZtCxvrcXQaLJcFA== X-Gm-Message-State: AOJu0Yz808QuS6jzBSeExIqKwaqZbWTCz+KR2NbItbd/UJNVEV+/xnjF Jj7cN5g8iLhv4m/UOKssr4Ki6f9R57RpWFKvqSavSWljSzOCCBJAPBeFxpuJwc1mSEXMLc69wFO MRpW+av+RqAXqPOnTKDGvrAykp0k= X-Google-Smtp-Source: AGHT+IEDLekTthel4Y5+N7wk2Ebx/TqSIUo5ZmXqZYKzfwm8OYQIyg1aMWXw8mEp/xE+UdBPaSQSo04VJcdarmbJbvA= X-Received: by 2002:a05:6402:3486:b0:57c:758d:86f8 with SMTP id 4fb4d7f45d1cf-5879f69c67fmr2014680a12.23.1719727834969; Sat, 29 Jun 2024 23:10:34 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 29 Jun 2024 23:10:34 -0700 In-Reply-To: <8634pyr0w8.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 May 2024 08:44:23 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288167 Archived-At: Eli Zaretskii writes: > tags 71282 notabug > thanks > >> From: Mohsin Kaleem >> Date: Thu, 30 May 2024 23:27:02 +0100 >> >> Looks like there's no way to give hl-line a higher priority than other >> text overlays. > > Of course there is: use the hl-line-overlay-priority option, like you > did below. But the problem you are trying to solve cannot be solved > by overlay priorities, see below. > >> This impacts things like eglot-inlay-hints-mode or >> overlay-error-string among other modes and has the affect of making >> hints or annotations from these modes look out of place. > > Those 2 examples are not expected to be affected by the priority of > the hl-line overlay, albeit for different reasons: > > . eglot-inlay-hints-mode overlays have their priorities at 50+, and > these overlays display strings (so are similar to your snippet > below) > . overlay-error-string is not an overlay (despite its confusing > name) > >> I can reproduce this with something as minimal as: >> >> $ emacs -Q >> $ M-: >> (progn >> (setq hl-line-overlay-priority 10) >> (hl-line-mode) >> (erase-buffer) >> (insert ";; This buffer is for text that is not saved, and for Lisp ev= aluation. >> ;; To create a file, visit it with =E2=80=98SPC f f=E2=80=99 and enter t= ext in its buffer.") >> (let ((ov (make-overlay (+ (point-min) 2) (+ (point-min) 3)))) >> (overlay-put ov 'before-string "foo") >> (overlay-put ov 'priority 5))) >> >> If you move the point to the first line you can see the overlay and its >> face background completely disregards hl-lines background despite having >> a lower priority. > > This is intended behavior: overlay priority affects only the text to > which the overlay is applied. In the above snippet, the overlay is > applied to buffer text, whereas "foo" is an overlay string, and has > its own face information (which defaults to the face of the underlying > buffer text). So the hl-line overlay's face does not affect the face > of the before-string. > > There's no bug here, only a well-documented behavior. See the node > "Displaying Faces" in the ELisp manual for the details. I'm therefore closing this bug report.