-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: "Invalid search bound (wrong side of point)" #27
Comments
Hi Ketan, Thanks for the kind words. I'm glad to hear that it's useful to you. And thanks for reporting this bug. I have noticed it myself since making one of the bug fixes in recent releases. Unfortunately, it didn't seem to happen until after I had made the release containing it. However, other than the "Invalid search bound" showing up in the messages buffer, the only problem I've noticed is that sometimes it causes Anyway, as you've probably noticed, debugging this function can be tedious, despite my best efforts to write the code in an understandable way, so I haven't dug into it yet. I'm sure the fix will be simple, once it's found; probably just a minor logical mistake in the point's position. And, thankfully, your having found a way to reproduce the problem should help with that. I can't promise to work on this soon, as I have a lot going on right now, but when I do, this information will undoubtedly help. Thanks, |
By the way, if you happen to want to dig into this any further, a couple of tips:
|
Thanks for the helpful tips. Best |
On Emacs 29.3, I'm getting tons of Error during redisplay: (jit-lock-function 137583) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137536) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137468) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137427) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137403) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137370) signaled (error "Invalid search bound (wrong side of point)")
Error during redisplay: (jit-lock-function 137300) signaled (error "Invalid search bound (wrong side of point)") |
@shipmints FWIW, the errors do occur sometimes often, but I've noticed no performance problems as a result, which is why I haven't dug into the problem yet. Anyway, IIRC the "invalid search bound" error started with v0.3.3, and the fix in that shouldn't affect you I think, so feel free to test with v0.3.2 and see if you still notice a performance problem. |
This is technically a workaround, but it should be good enough for now, since it's not really a problem. (It's even possible that it's the best solution, but stepping through the code and testing in the font-lock-studio to find out isn't worth the time right now, since this seems to fix it.) See #27.
@disconsis @shipmints FYI, I've pushed a workaround/fix for this to |
Seems solved via latest ELPA (I checked it's identical to master). Thank you for following up on this. |
@shipmints I think you mean MELPA, since prism.el isn't on GNU ELPA. :) Thanks. |
Yeah yeah I'll have to write (rx (zero-or-more anything) "ELPA") from now on :) |
Hey, I've been having a great time with the package. Thanks for your great work!
I've been noticing some
jit-lock
errors and I narrowed it down to prism.My setup is GNU Emacs 29.0.60, with Doom emacs, and prism v0.3.2
It's only with one emacs lisp file, and it's some weird combination of length of the file (like 600 lines) and a comment line. Bisecting the file itself hasn't gotten much info, but it seems like it only occurs when there's at least a full window of content and something to do with this starting section of the file:
and especially this line - "Some functionality uses this to identify you, e.g. GPG configuration, email" seems to be causing issues.
Since this error was thrown by
jit-lock-mode
, I wasn't able to debug it very effectively.However, I've narrowed it down to this section:
Specifically, it seems like
re-search-forward
, even when itsnoerror
argument is true, raises an error when the current point is less than thebound
argument.After modifying the section to:
I get these logs:
So I think wrapping this (and maybe also the other)
re-search-forward
calls withignore-errors
will be at least a good band-aid fix. I'm not sure about the true cause of this though.Best
Ketan
The text was updated successfully, but these errors were encountered: