From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: locked narrowing Date: Wed, 17 Aug 2022 09:06:21 -0400 Message-ID: References: <66bbbb95983414e79637@heytings.org> <83wnb9hadb.fsf@gnu.org> <395454dd-7238-c5d0-e924-2f65a186baa7@yandex.ru> <83r11hh4pm.fsf@gnu.org> <3a1232a17b09ce88af40@heytings.org> <83edxghqg2.fsf@gnu.org> <325f95fd2bcc0b666b0b@heytings.org> <83edxgfi75.fsf@gnu.org> <5e3c3081-f098-8140-c767-b895c32bf30b@yandex.ru> <835yisffil.fsf@gnu.org> <831qtgff78.fsf@gnu.org> <83zgg4dw4y.fsf@gnu.org> <83r11gdrr4.fsf@gnu.org> <83edxfds7s.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17847"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56682@debbugs.gnu.org, gregory@heytings.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 17 15:07:22 2022 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 1oOIlV-0004P1-B4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 15:07:21 +0200 Original-Received: from localhost ([::1]:45234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOIlU-0006RU-0l for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 09:07:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOIlC-0006PJ-TV for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOIlC-0001KP-KX for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOIlC-0001Ds-D2 for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 09:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Aug 2022 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.16607415954651 (code B ref 56682); Wed, 17 Aug 2022 13:07:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 17 Aug 2022 13:06:35 +0000 Original-Received: from localhost ([127.0.0.1]:49758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOIkl-0001Cx-Ef for submit@debbugs.gnu.org; Wed, 17 Aug 2022 09:06:35 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOIkg-0001Cg-PB for 56682@debbugs.gnu.org; Wed, 17 Aug 2022 09:06:33 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5DAE844162A; Wed, 17 Aug 2022 09:06:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4C2C644161B; Wed, 17 Aug 2022 09:06:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660741584; bh=HpRMJhWtsMx1wUUzEPW2+oomVqf0yqQ+gEUoffVUYlE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=acknxoFjoNPVTEfKWlTu/gHLYLbvQYsgwvNv/aaqRYpY7Qaso1OZotyvFO6+1zZEY VZO9VWMPOOliuxKXVGsRn4DJDJ302jOETUjQWVqTFzpTyjj3p6mm3JIMgUMr9pw6r5 c5YnQSYWpFZA+LaBi5WO4p3c6V1YfJbtzcQcD2CxAi+ltO64WntJSNobYdCGqf30i/ z2/m+J8KIJx/iCweuhP0TM8t5gogZ7GsFktyBvsFcq0AlOI+gcEXSIURww6pDaHQvL MmphZb7zY/ZNVbXbs8TmvoX0u0hclmogZvusG2npOcIVOF11hfg6Z5pXlYzyTcJkl+ 5BK5bP/x5AESw== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1E7D61202E9; Wed, 17 Aug 2022 09:06:24 -0400 (EDT) In-Reply-To: <83edxfds7s.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2022 14:28:39 +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" Xref: news.gmane.io gmane.emacs.bugs:240072 Archived-At: > If a package wants to count lines in a function registered with > jit-lock, I think it makes no sense for it to do that in Lisp. It > would be much better to let such packages use the built-in > capabilities that we use all the time, both on the mode line and under > display-line-numbers mode. There are at least two advantages to that: > (1) it will be at least slightly faster, sometimes more than slightly > (due to caching); and (2) the problem of narrowing would be seamlessly > resolved. FWIW, I agree. I don't think this information is cleanly&reliably exposed to ELisp, tho, which is why nlinum-mode does it "by hand" (with its own caching). Stefan