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.bugs Subject: bug#56682: locked narrowing Date: Wed, 17 Aug 2022 17:25:21 +0300 Message-ID: <83lernc5gu.fsf@gnu.org> References: <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> <83r11fc80o.fsf@gnu.org> <83o7wjc6o2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, dgutov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 17 16:26:11 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 1oOJzl-0005FO-Uf for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 16:26:10 +0200 Original-Received: from localhost ([::1]:54240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOJzk-0000k5-Vc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Aug 2022 10:26:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOJze-0000iq-1T for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 10:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOJzd-0003ET-Of for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 10:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOJzd-00044c-LP for bug-gnu-emacs@gnu.org; Wed, 17 Aug 2022 10:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 Aug 2022 14:26:01 +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.166074634215633 (code B ref 56682); Wed, 17 Aug 2022 14:26:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 17 Aug 2022 14:25:42 +0000 Original-Received: from localhost ([127.0.0.1]:52759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOJzJ-000445-U2 for submit@debbugs.gnu.org; Wed, 17 Aug 2022 10:25:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOJzI-00043s-8c for 56682@debbugs.gnu.org; Wed, 17 Aug 2022 10:25:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOJzC-0003BS-35; Wed, 17 Aug 2022 10:25:34 -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=5W5U9+DOd/0c4msKf+3I6o+LsuVnUh/xieYOAnKaNeA=; b=g+3uEfmcwjLb 0tNOss7wOZjbMlhxZs34UsyyhGH1G2bCmwv1tYxWvROTI479kzR0EyBC7rIqtnlOw6s7vgqLhXgbD /+ZE49wj3QE0aW/vspGTL0ggHV/cLGHSml3X9m3x25od9P2qvAGuFvSDKJkpMIHyCetj8d2TjCW3x x1Wrus09qCEnk6aFYvrq48CpNZCRyq8QtI5XCv14Sfae7/Xu5zCSnc+10DZFK8/54NUQ2k5ieJVuO 7H7GEto1EKgCc3qSVTGNNYKBSw0dQWVycdVU9icUeWcm4rx5Ejbj7Ws8QpJbtaJ0uGvsiI11x/Bw5 8Lkf9P5umdT+0Y5jBgzA7Q==; Original-Received: from [87.69.77.57] (port=2727 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 1oOJz8-0000a1-OC; Wed, 17 Aug 2022 10:25:32 -0400 In-Reply-To: (message from Stefan Monnier on Wed, 17 Aug 2022 10:11:28 -0400) 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:240087 Archived-At: > From: Stefan Monnier > Cc: dgutov@yandex.ru, 56682@debbugs.gnu.org, gregory@heytings.org > Date: Wed, 17 Aug 2022 10:11:28 -0400 > > >> Last time I looked at it, I couldn't quite understand how the cache > >> works there, so I wasn't sure how to make sure it returns valid > >> information even if called outside of redisplay. > > Looking at what maybe_produce_line_number does doesn't help? > > I see two problems: > > - The problem I already mentioned: the cache seems to be > maintained/flushed by the redisplay code, so when the function is > called outside of redisplay I don't know if `w->base_line_number/pos` > is still valid. So you are saying that any command which uses vertical-motion or more generally any of the move_it_* functions will work incorrectly when line numbers are on display? I'm not aware of any such problems. > - The fact that this uses line numbers counted from BEGV whereas nlinum > counts from BEG. I think you missed the display-line-numbers-widen variable and its effect.