On Wed, 29 Jun 2011 09:10:19 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote: > On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote: > > This patch series fixes the bug reported by Sebastien in [1]. I > > was able to reproduce it and confirm that the second patch from > > this series fixes the problem. Unfortunately, I can not explain > > why it fixes it. The patch uses a cleaner approach for visible > > text search. But the old approach should work fine as well. > > Apparently, it does not work when `invisible' property is not a > > single symbol but a list (which was changed in > > 95ef8da29439f2e79115c36ab4d2a80aef1a1462). I suspect that it is > > an Emacs bug. I plan to look at it later. > > > > Turns out that `point-invisible-p' is a function from notmuch-lib.el, I > did not realize that before. It implements a custom visibility check > which is incomplete and does not work correctly when `invisible' > property is a list. That is why the previous code (which used > `point-invisible-p') had the bug. I sent another patch that removes > `point-invisible-p' function. > > > Another issue is that the test does not demonstrate the bug. > > Again, I do not really know why. It passes both before and after > > the fix. Although if I run the test commands by hand I hit the > > bug. I guess it has something to do with emacs daemon mode when > > the buffer is not visible. I hope someone with a better elisp > > knowledge can tell what is going on and how to make the test > > work. > > > > Now it is clear where the bug was. Remaining question is how to test > it. Hi, I applied the series, and I can confirm it fixes the bug. Hiding of messages also seems to work as expected, including the un-hidden signatures, which is what the commit that introduced this bug originally fixed. Many thanks. I have no insights on the automated tests, though. Jani