From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Colorful line numbers Date: Sat, 23 Jul 2022 21:50:33 +0300 Message-ID: <643a0a88-bf8f-4c37-5e13-74b7f2d20c9d@yandex.ru> References: <87leslpow2.fsf@gmail.com> <2aabd319-8e8c-72dd-3143-45de9172dc54@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29584"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , 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 20:51:42 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 1oFKE2-0007Z9-Gn for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 20:51:42 +0200 Original-Received: from localhost ([::1]:36226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFKE1-0006by-2D for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 14:51:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFKDB-0005wy-Ny for emacs-devel@gnu.org; Sat, 23 Jul 2022 14:50:49 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:35713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFKD9-0000JQ-SS for emacs-devel@gnu.org; Sat, 23 Jul 2022 14:50:49 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id v67-20020a1cac46000000b003a1888b9d36so7003392wme.0 for ; Sat, 23 Jul 2022 11:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=p/coZqKqbEUTOM2COCJI2c5VwcHq+NjcZAuGJbKdfFg=; b=Wlaa/IzDjM5OxVtsmSHMNiVhRtmsNdQAo3cAnaVziem//InDcZRZeD6oOwCFKQB/KS 4HrYzwF6LI2uTtE8VvSHgeWwN+kEixf33mJdwjeeFQx0x3xMm2fX8mnc4qwnCWR6RVSk RLKZxZmeXOn7Uu2x9HtWWoPzaTnN1DwV5rzeomPqUjCcDShHKRgP75KE9phIoPd3AF08 5zj2ZJMTACRRSKEnBOnx9OHeK7RKHVfhMta2vQAGiQdV839PmLysIIO28Ql14t2s9kG6 eBhy4L59em4JbDMnh82lyGQgUr56T2VxBqKNbmnhNhRRWpUTlb4VarqO/05wyBadXv1M wukg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=p/coZqKqbEUTOM2COCJI2c5VwcHq+NjcZAuGJbKdfFg=; b=1mDYyb30dnFJ2DDj6kxqi0tFuJBJ2IAw6VvdjtWUlkGt4M2lxtiRnryIZkEEY3njGg VqRcChd9KGQKc0GJbJzQaFOxxZup/p8QWkLKz/ihpb12UAFKsSm2Z6QDiNsL9AvdXdDP mSQwiyWMxZ8WLSHdqL96xO4TlwFdfLbwEh0ugT8EOb667emzOjSTG6Xp8HW0NtQmobyr xsx6PgWgphHOxZEfsKX+cCos7W7LwHtH/Adh9W0gAZX7/pTMh5YPq2jAhL3sqW2FUsAm 9a9rF+wuq/unQT4LCqaygoi2kc0ANBczd/nX4uwU8y7MF2xVRrx/HSKqhc1NKUAozpMb eniA== X-Gm-Message-State: AJIora/86p4pJDqognZRbr3QxQUARi4V9oPVRKrb8fCGrkk4F7xc1cSJ tWjeetaRr/yPlVfNX4vRIS4= X-Google-Smtp-Source: AGRyM1uAy3jnoJjn8RLhOwvaY/YvUnW6fvqo5ALcpQkQehrekBWjFBphn9tDBEVhIhziXRh98ARKfQ== X-Received: by 2002:a05:600c:1e04:b0:3a3:11ca:5c0c with SMTP id ay4-20020a05600c1e0400b003a311ca5c0cmr3672862wmb.31.1658602236214; Sat, 23 Jul 2022 11:50:36 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m9-20020a056000024900b0021d746d4820sm7664720wrz.37.2022.07.23.11.50.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Jul 2022 11:50:35 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=raaahh@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:292552 Archived-At: On 23.07.2022 02:32, Stefan Monnier wrote: >>>> Also seehttps://debbugs.gnu.org/36472. >>> Have you tried to add such a feature for `(n)linum-mode`? >> I didn't: that's not what the diff-hl user was asking for. > > But you could add that feature to `diff-hl` for `(n)linum-mode` so > people can at least try it out. I don't really use either myself. I hear display-line-numbers-mode has improved on some essential performance problems, but I have no practical knowledge to substantiate that. Either way, the person was asking for integration with the latter package. So I fear my effort would end up unused even if I took it up. >> And if we take an alternative approach (display-line-numbers-mode looks up >> text properties in the buffer to determine which face to use), it also >> depends on the intricacies of its implementation. E.g. how to reliably >> redraw when such text properties change. > > My hunch is that such changes to text-properties would cause > a rerendering of those lines anyway (the decision whether to re-render > doesn't pay attention to which properties have been changed, IIRC), so > it may end up "just working" without any effort in this respect. > Then again, maybe not. That would be my basic expectation as well, but I dimly recall that d-l-n-mode performs some additional optimizations in order not to recalculate line numbers.