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: Fri, 22 Jul 2022 14:00:23 +0300 Message-ID: <83ilnpl8e0.fsf@gnu.org> References: <87leslpow2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30616"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 22 13:13:32 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 1oEqb5-0007q5-Nb for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Jul 2022 13:13:31 +0200 Original-Received: from localhost ([::1]:56384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEqb4-00032q-6z for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Jul 2022 07:13:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEqOT-0005ol-Ob for emacs-devel@gnu.org; Fri, 22 Jul 2022 07:00:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEqOT-0001Zf-D0; Fri, 22 Jul 2022 07:00:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=1NoAM7XJvsEaSXzY0uKb09RegiuJCq4Yb1KdPB/Z7Jw=; b=HiPiwBZtHF11ImoQeuB6 0mJEix8thWw6WJqu3MjLFcg7+N2Foz1UwI9FcoYsApvNrvz+vlU+bavLoaG6ltY4vuFsa21nRBsQI GBRpmtjTio9G2F85bKijEJpn32ZHWbxqpJfQuunQhhXCUijQD2VvX1OPN51HBHO+PA3Fyjm6XTFD3 M5kzQtbPgcfZcIOBhGVhTwqOc+yuF4w7c27Ti/CEHvDcgWPWWlP+bd6KQ3nze1PWK3SpvBkW5ysPI b1EvB5s7K0BdvpWhg5kE+HwjgHng/S+ubQbZ8+mcURPRTyCjqpzU/UPStKDExW7HnPzLb0X3gw3tg Z9k+v7e/KZXChA==; Original-Received: from [87.69.77.57] (port=1899 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 1oEqOS-0003M1-Py; Fri, 22 Jul 2022 07:00:29 -0400 In-Reply-To: <87leslpow2.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 22 Jul 2022 08:50:21 +0100) 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:292416 Archived-At: > From: João Távora > Date: Fri, 22 Jul 2022 08:50:21 +0100 > > As far as I can read from maybe_produce_line_number in xdisp.c the face > is one of a fixed set: line-number, line-number-current-line, > line-number-major-tick or line-number-minor-tick. Yes. > IOW, there is no Elisp mechanism for changing the line number on a > line-by-line basis, for example with some text property set on any > character of the given line. > > Could we implement one such mechanism? No. The native line-number display is implemented inside the low level of the display code, and I don't want to call to Lisp from there. If nothing else, it will slow down redisplay when line numbers are used, whereas avoiding that slowdown was an explicit goal of developing native line-number display. Why aren't the existing faces enough? And if they aren't enough, why cannot you use line-number-mode?