GNU bug report logs - #57266
Maintaining the base_line_number cache

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 17 Aug 2022 21:20:02 UTC

Severity: normal

Tags: patch

Full log


Message #29 received at 57266 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 57266 <at> debbugs.gnu.org
Subject: Re: bug#57266: Maintaining the base_line_number cache
Date: Mon, 22 Aug 2022 19:21:43 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 57266 <at> debbugs.gnu.org
> Date: Mon, 22 Aug 2022 09:32:50 -0400
> 
> >> > I didn't just mean just_this_one_p thingy, I meant all the changes
> >> > that attempt to somehow "clean up" the use of the line-number cache.
> >> > Why do we have to do that at all?  This stuff is not too complex, and
> >> > it works for ages!  Isn't the fact that we find more and more small
> >> > issues with the changes telling you something?
> >> 
> >> Yes, it's telling me that the code is a mess and I'm trying to fix it by
> >> documenting what is actually needed.
> >
> > It's fine to fix and enhance the documentation, but please don't fix
> > the code that works.
> 
> If the code doesn't match the doc, then we'll never know if the doc
> is wrong.

Which is why I'm perfectly OK with documenting what the code does.

I'm also OK with adding a single function that makes the tests for
invalidating the cache, and then calling that function everywhere
where we now do such tests, not all of them identical.  And in that
function we can document everything we know about the cases where the
cache should be invalidated.

But please leave the tests themselves where they are done now, I see
no special reason to move them.  Because nothing is really wrong,
except the one case you found (and which we should fix, I agree).

Please!  I hope my requests mean something, given that I'm the only
one who works on bugs in these areas, and probably will keep doing
that for the observable future.




This bug report was last modified 2 years and 298 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.