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#57266: Maintaining the base_line_number cache Date: Tue, 23 Aug 2022 18:56:28 +0300 Message-ID: <834jy37y37.fsf@gnu.org> References: <831qteccli.fsf@gnu.org> <834jy4bhqp.fsf@gnu.org> <83y1vga0l5.fsf@gnu.org> <83edx89rl4.fsf@gnu.org> <8735dnrqf0.fsf@gnus.org> 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="29052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57266@debbugs.gnu.org, monnier@iro.umontreal.ca To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 18:09: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 1oQWSk-0007Lv-1G for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 18:09:10 +0200 Original-Received: from localhost ([::1]:55302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQWSi-0006Gt-P8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 12:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQWH1-0005eC-3F for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 11:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQWGz-0005Su-Qa for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 11:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQWGz-00051o-MW for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 11:57: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: Tue, 23 Aug 2022 15:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57266 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57266-submit@debbugs.gnu.org id=B57266.166127018919286 (code B ref 57266); Tue, 23 Aug 2022 15:57:01 +0000 Original-Received: (at 57266) by debbugs.gnu.org; 23 Aug 2022 15:56:29 +0000 Original-Received: from localhost ([127.0.0.1]:44864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQWGT-00050z-Cu for submit@debbugs.gnu.org; Tue, 23 Aug 2022 11:56:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQWGR-00050m-EN for 57266@debbugs.gnu.org; Tue, 23 Aug 2022 11:56:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQWGM-0005Pj-48; Tue, 23 Aug 2022 11:56:22 -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=LBefLvWPQP24/5asV3Jswfyp3fglgHtm5XnRawqv+u0=; b=df3sdEaew640xd/apLX/ lQxKlbwi69pNO/wjlTLDN9m12ZC1b+xJYfWocV/cqXG/fFp+zPlo5KjCctRDulAM4D9BH/FCYUgo/ 5/RluOo8RbjnCVBsc1is2cBtQQKJLMU4Ck4+Bbrfl22XCmuC6s7L4YVJk1LjNWzZW+qsNTO00OrDz oKdkPJgpqsHsOzCs2vwo1ri2BwV17kgqPzy13JhixOC7RBr4NrjT+/CTul1N5srh0zSoEEhkQwK0q H4BDDiPX0K4q/bg3wltt4BjVzOwWaibAVgxOaCAKKmgXMx1Hc/fLgfP0KxdvfmZoJAqP7goDa0FhB diK/ZtdKuF0Rsg==; Original-Received: from [87.69.77.57] (port=4573 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 1oQWGL-0005UB-3A; Tue, 23 Aug 2022 11:56:21 -0400 In-Reply-To: <8735dnrqf0.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 23 Aug 2022 16:21:55 +0200) 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:240554 Archived-At: > From: Lars Ingebrigtsen > Cc: Stefan Monnier , 57266@debbugs.gnu.org > Date: Tue, 23 Aug 2022 16:21:55 +0200 > > Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > > > Indeed, my proposed patch is not a bug fix. > > It's a code-maintenance patch. It's meant to improve the code, not > > the behavior. > > My two cents: I was reading through parts of the newline (cache) code > last week while I was pondering whether to do the `pos-eol' functions or > not, and I have to say that I found it pretty impregnable. So in a way > I'm relieved to learn that it's (partly) because the code doesn't make > as much sense as it should. 😀 > > Apparently Eli is the only person that understands the code at present, > and I understand his reluctance to change something that works. But > making the code easier to understand would enable more people to > actually handle the code. So I'm in favour of improving the code. I'm also in favor of improving the code. I just disagree with Stefan about what constitutes "improvement" in this case. I had my share of "TIL" experiences, where I was positive I knew how the code should work and wrote or changed something accordingly -- only to discover that some of my concepts were completely wrong or missed some important aspects which wound up invalidating some of the code I wrote. I don't think I'm alone in that. Breaking things while fixing real bugs is justified. But this isn't that case.