From unknown Mon Jun 23 05:58:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47893 <47893@debbugs.gnu.org> To: bug#47893 <47893@debbugs.gnu.org> Subject: Status: 27.1; `display-line-numbers-mode`, line numbers hidden with multiline overlays Reply-To: bug#47893 <47893@debbugs.gnu.org> Date: Mon, 23 Jun 2025 12:58:18 +0000 retitle 47893 27.1; `display-line-numbers-mode`, line numbers hidden with m= ultiline overlays reassign 47893 emacs submitter 47893 Daniel Mendler severity 47893 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 10:46:54 2021 Received: (at submit) by debbugs.gnu.org; 19 Apr 2021 14:46:54 +0000 Received: from localhost ([127.0.0.1]:51571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVAs-0008RX-7K for submit@debbugs.gnu.org; Mon, 19 Apr 2021 10:46:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:42654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVAq-0008RO-4z for submit@debbugs.gnu.org; Mon, 19 Apr 2021 10:46:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVAn-0007aK-OX for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 10:46:51 -0400 Received: from server.qxqx.de ([2a01:4f8:121:346::180]:41237 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVAd-0001iL-EY for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 10:46:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n7wcCcVpAaL7rudcRKl8CH+XwtbHElNGYQzfpyVJZSY=; b=xrCefkMoioILEhIzxlCB4IPSPq B2lwsslnY1e/d0871w47TRlmlisK6+MkHjTZRbMeO+fpzJ+8wt9ZVnZmjrgaF1E+1F3xr2IKky29Y NAgiVvRbn/SFKpSfPD6QzOLYgiBmnEMnZlY8fRIwHMqEnvCHN7W9Zkl1qkir5mDAjI+A=; To: bug-gnu-emacs@gnu.org From: Daniel Mendler Subject: 27.1; `display-line-numbers-mode`, line numbers hidden with multiline overlays Message-ID: Date: Mon, 19 Apr 2021 16:46:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) When putting an overlay over multiple lines, the line numbers of `display-line-numbers-mode` are hidden. (defun bug () (display-line-numbers-mode) (goto-char (point-min)) (let ((ov (make-overlay (line-beginning-position) (save-excursion (forward-line 4) (line-beginning-position))))) (overlay-put ov 'invisible t) (overlay-put ov 'before-string "line1\nline2\nline3\line3\nline4\n"))) I've also observed the issue with Emacs 28. In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2021-02-09, modified by Debian built on 3df710f593d9 Repository revision: b0229d4bbaea7fcddffced393512c650212830db Repository branch: deb/emacs/d/sid/master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster) From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 10:55:41 2021 Received: (at 47893) by debbugs.gnu.org; 19 Apr 2021 14:55:41 +0000 Received: from localhost ([127.0.0.1]:51609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVJN-0000GN-Ek for submit@debbugs.gnu.org; Mon, 19 Apr 2021 10:55:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVJL-0000G1-7b for 47893@debbugs.gnu.org; Mon, 19 Apr 2021 10:55:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42489) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJF-0007MV-Ih; Mon, 19 Apr 2021 10:55:33 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4804 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lYVJB-0006eL-WC; Mon, 19 Apr 2021 10:55:33 -0400 Date: Mon, 19 Apr 2021 17:55:14 +0300 Message-Id: <83h7k2s4rx.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: (message from Daniel Mendler on Mon, 19 Apr 2021 16:46:16 +0200) Subject: Re: bug#47893: 27.1; `display-line-numbers-mode`, line numbers hidden with multiline overlays References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47893 Cc: 47893@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Daniel Mendler > Date: Mon, 19 Apr 2021 16:46:16 +0200 > > When putting an overlay over multiple lines, the line numbers of > `display-line-numbers-mode` are hidden. > > (defun bug () > (display-line-numbers-mode) > (goto-char (point-min)) > (let ((ov (make-overlay (line-beginning-position) > (save-excursion (forward-line 4) > (line-beginning-position))))) > (overlay-put ov 'invisible t) > (overlay-put ov 'before-string "line1\nline2\nline3\line3\nline4\n"))) What do you mean by "hidden"? With the above recipe, I see all the line numbers starting from 5, as expected. What is "hidden" here? From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 11:11:11 2021 Received: (at 47893) by debbugs.gnu.org; 19 Apr 2021 15:11:11 +0000 Received: from localhost ([127.0.0.1]:51620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVYN-0000dq-6R for submit@debbugs.gnu.org; Mon, 19 Apr 2021 11:11:11 -0400 Received: from server.qxqx.de ([178.63.65.180]:41863 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVYK-0000dd-BA for 47893@debbugs.gnu.org; Mon, 19 Apr 2021 11:11:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OlQfSAgCnEv4gkDFT7a50Mo8WpA/MKEJ3PGIH/OlHCY=; b=L36ykZPlfAg2N/T4Kx4EPAbC9l R+Zltlp911JDzChcBhspsrPuExL8c8rUgttK7MzEc1+1CcENI/iufXgcvy0fDU5mxbn5VOFSq2ROn 8wj6wLedZS/3XpK+fwdxhVhensGGdM8HxImwQfsFL3Fi0WUlRKK9MfWnP+uoYLkTrIgE=; Subject: Re: bug#47893: 27.1; `display-line-numbers-mode`, line numbers hidden with multiline overlays To: Eli Zaretskii References: <83h7k2s4rx.fsf@gnu.org> From: Daniel Mendler Message-ID: <4774d5f2-f8d3-bdc5-d315-03dcca400cb5@daniel-mendler.de> Date: Mon, 19 Apr 2021 17:10:59 +0200 MIME-Version: 1.0 In-Reply-To: <83h7k2s4rx.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47893 Cc: 47893@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 4/19/21 4:55 PM, Eli Zaretskii wrote: > What do you mean by "hidden"? With the above recipe, I see all the > line numbers starting from 5, as expected. What is "hidden" here? When I have a buffer with the following content: 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i And run the given function, I see the following: 5 line1 line2 line3 line4 e 6 f 7 g 8 h 9 i I suppose this is expected since the overlay hides all the lines in between? You can close this issue then as invalid, since the display line numbers don't reflect the visual lines but the lines in the buffer. Sorry for the noise! From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 11:29:54 2021 Received: (at 47893-done) by debbugs.gnu.org; 19 Apr 2021 15:29:54 +0000 Received: from localhost ([127.0.0.1]:51747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVqU-0001D6-JN for submit@debbugs.gnu.org; Mon, 19 Apr 2021 11:29:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVqQ-0001Cs-VQ for 47893-done@debbugs.gnu.org; Mon, 19 Apr 2021 11:29:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43204) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVqL-0007l8-3q; Mon, 19 Apr 2021 11:29:45 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3170 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lYVqK-00073u-2Z; Mon, 19 Apr 2021 11:29:44 -0400 Date: Mon, 19 Apr 2021 18:29:28 +0300 Message-Id: <83fszms36v.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <4774d5f2-f8d3-bdc5-d315-03dcca400cb5@daniel-mendler.de> (message from Daniel Mendler on Mon, 19 Apr 2021 17:10:59 +0200) Subject: Re: bug#47893: 27.1; `display-line-numbers-mode`, line numbers hidden with multiline overlays References: <83h7k2s4rx.fsf@gnu.org> <4774d5f2-f8d3-bdc5-d315-03dcca400cb5@daniel-mendler.de> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47893-done Cc: 47893-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Cc: 47893@debbugs.gnu.org > From: Daniel Mendler > Date: Mon, 19 Apr 2021 17:10:59 +0200 > > On 4/19/21 4:55 PM, Eli Zaretskii wrote: > > What do you mean by "hidden"? With the above recipe, I see all the > > line numbers starting from 5, as expected. What is "hidden" here? > > When I have a buffer with the following content: > > 1 a > 2 b > 3 c > 4 d > 5 e > 6 f > 7 g > 8 h > 9 i > > And run the given function, I see the following: > > 5 line1 > line2 > line3 > line4 > e > 6 f > 7 g > 8 h > 9 i Right, and this is expected. > I suppose this is expected since the overlay hides all the lines in > between? Yes, exactly. We only show the line numbers for lines that are displayed. Compare with, for example, Org buffers, where we don't show line numbers for lines that are invisible. > You can close this issue then as invalid, since the display line > numbers don't reflect the visual lines but the lines in the buffer. You can have the visual line numbers as well: just set the line-number style to 'visual'. Closing. From unknown Mon Jun 23 05:58:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 18 May 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator