[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34525: replace-regexp missing some matches
From: |
Stefan Monnier |
Subject: |
bug#34525: replace-regexp missing some matches |
Date: |
Wed, 27 Feb 2019 10:40:19 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> Here, in seeking the next interval, we go down a chain of `left's. We
>> do not set the ->position field of these intervals, except for the last
>> one, which we return.
>> So the returned interval doesn't satisfy the condition that all its
>> parents have their ->position's set correctly.
[...]
> I've done this, and it appears to have fixed the bug. :-)
AFAICT the only place where we need the parents to have
a valid ->position is in update_interval. So maybe another fix is to
change update_interval so it computes the parent's ->position rather
than rely on it having the right value.
I personally don't have a preference and I'm not sure which option would
be better performancewise.
If we opt (like your patch does) to have the invariant that
the ->position of parents is kept up-to-date, then maybe we should
change find_interval to guarantee this (which would basically be
a matter of moving the corresponding code from update_syntax_table where
we update the parents's ->position after calling find_interval) ?
Stefan
- bug#34525: replace-regexp missing some matches, (continued)
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/26
- bug#34525: replace-regexp missing some matches, Stefan Monnier, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/26
- bug#34525: replace-regexp missing some matches, Stefan Monnier, 2019/02/26
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/27
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/27
- bug#34525: replace-regexp missing some matches,
Stefan Monnier <=
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/27
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/27
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/27
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/27
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/28
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/28
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/28
- bug#34525: replace-regexp missing some matches, Stefan Monnier, 2019/02/27
- bug#34525: replace-regexp missing some matches, Eli Zaretskii, 2019/02/27
- bug#34525: replace-regexp missing some matches, Alan Mackenzie, 2019/02/27