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: Colorful line numbers Date: Sat, 23 Jul 2022 20:07:42 +0300 Message-ID: <83sfmrhi5d.fsf@gnu.org> References: <87leslpow2.fsf@gmail.com> <83ilnpl8e0.fsf@gnu.org> <874jz9peq0.fsf@gmail.com> <837d45l6ge.fsf@gnu.org> <87zgh1nyo6.fsf@gmail.com> <831qudl1k3.fsf@gnu.org> <87v8rpntiv.fsf@gmail.com> <83sfmtjjy8.fsf@gnu.org> <87fsitnpxd.fsf@gmail.com> <83k085jgxr.fsf@gnu.org> <835yjojr0f.fsf@gnu.org> <87pmhwmat0.fsf@gmail.com> <83ilnoi0ro.fsf@gnu.org> <834jz7j07y.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30898"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 23 19:09:05 2022 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 1oFIci-0007s9-UW for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 19:09:05 +0200 Original-Received: from localhost ([::1]:54606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFIch-00078W-G5 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 13:09:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFIbR-0006R1-HU for emacs-devel@gnu.org; Sat, 23 Jul 2022 13:07:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFIbQ-00031k-Tn; Sat, 23 Jul 2022 13:07:44 -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=6djZ6ewTt4Q+NsTzENKyH4xxL3+Zszz/57+VQMjdv+w=; b=A24oEh6ACMWM vagF1jMnVIWxCyUOfY2djSu5BmViN+L6YQO6lisVB3g3Zpqy9OhFDQLM39vz9qhoxHiBe2u4Z6iBp 2BgJkGfrSnpTwqvwHooW0llldnMVBnZVfdD+MQVEHHmkBtiLPT6LdbqGsYopcPTLU2f2hdXogE8B0 +7Q6rMFxRZ79ThIC+sEU4c8QuwFF2jYkBTCkS72N37NbnrV44PkOL407pgrcI9MpKatBqFMO4CGW4 9b4QNptUn2JQfQ2pt6r7MDmrvlx9NnN8YzXZhogHudc6oW1OF//cJ+0Nq6Zq7WYuq1vyXm7jTZw9L vN5fSfGW/KsdBu3D5d1ELQ==; Original-Received: from [87.69.77.57] (port=3754 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFIbQ-0001ia-DI; Sat, 23 Jul 2022 13:07:44 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 23 Jul 2022 12:31:52 -0400) 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" Xref: news.gmane.io gmane.emacs.devel:292546 Archived-At: > From: Stefan Monnier > Cc: joaotavora@gmail.com, emacs-devel@gnu.org > Date: Sat, 23 Jul 2022 12:31:52 -0400 > > So adding a text property for the line numbers's face would (in > the worst case) add 2 "handle stop-points" per line (could be reduced > to one by making those properties cover the whole "line plus newline" > so there's only one stop-point between them). > > Could that really cause a measurable slow down? Depends on what else is in the buffer. If "one more stop-point per line" adds significantly to the number of stop-point (which I think it will in many cases, as code typically has few different faces per line), it will be measurable, yes. And using text properties for this kind of information is really not clean. It also comes with technical problems, because text properties cannot overlap. As I wrote earlier, I'd much prefer some buffer-local variable.