[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34525: replace-regexp missing some matches
From: |
Alan Mackenzie |
Subject: |
bug#34525: replace-regexp missing some matches |
Date: |
Mon, 25 Feb 2019 20:48:58 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Eli.
On Mon, Feb 25, 2019 at 22:11:57 +0200, Eli Zaretskii wrote:
> > Date: Sun, 24 Feb 2019 21:00:58 +0000
> > Cc: daniel.lopez999@gmail.com, 34525@debbugs.gnu.org,
> > monnier@iro.umontreal.ca
> > From: Alan Mackenzie <acm@muc.de>
> > > > Sadly, UPDATE_SYNTAX_TABLE sets its internal structure gl_state not for
> > > > the current contents of position 1948, but the contents of 1948 before
> > > > the change at the top of the buffer (Bitmap -> SharedBitmap) was made.
> > > > So it picks up the syntax for the "<" rather than the "B".
> > > Are you saying that we've modified buffer text, but
> > > re_match_2_internal still holds to a C pointer to buffer text before
> > > the change?
> > I don't think that's the case. The relevant buffer pointers/sizes are
> > calculated (in search_buffer_re) as
> > p1 = BEGV_ADDR;
> > s1 = GPT_BYTE - BEGV_BYTE;
> > p2 = GAP_END_ADDR;
> > s2 = ZV_BYTE - GPT_BYTE;
> > each time before a search.
> So you are saying that gl_state uses a stale offset, which should have
> been updated due to the previous replacements?
That's what I think is happening, yes. I need to gather more evidence,
though.
I've spent a lot of today fighting git and 2-year-old Emacs's build
systems trying to bisect the repository to find what introduced the bug.
--
Alan Mackenzie (Nuremberg, Germany).
- bug#34525: replace-regexp missing some matches, (continued)
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/20
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/20
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/20
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/20
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/20
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/20
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/24
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/24
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/24
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/25
- bug#34525: replace-regexp missing some matches,
Alan Mackenzie <=
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/26
- bug#34525: replace-regexp missing some matches, Stefan Monnier, 2019/02/26