Comments (15)
I just pushed a commit which I suspect should avoid this: my guess is that the timer was triggering while a different buffer was current.
from symbol-overlay.
The failing code was narrowing to (window-start)
and (window-end)
, and this causes an error like the one you saw if (window-end)
is larger than (point-max)
. I'm not exactly sure how this happened though. :-/
from symbol-overlay.
I am not sure this is related, but after upgrading the package I get:
Debugger entered--Lisp error: (error "Selecting deleted buffer")
set-buffer(#<killed buffer>)
(save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))
(lambda (buf) (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp)))(#<killed buffer>)
apply((lambda (buf) (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))) #<killed buffer>)
timer-event-handler([t 0 0 500000 t (lambda (buf) (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))) (#<killed buffer>) idle 0])
from symbol-overlay.
Unfortunately I still encountered this error, and also got the new error @manuel-uberti mentioned.
from symbol-overlay.
Hmm, I did push a follow-up commit that checked for liveness of the buffer before invoking with-current-buffer
. It looks like the code in the backtrace above is from before that fix. Are you still seeing this with the very latest MELPA package?
from symbol-overlay.
(See 66eaaef)
from symbol-overlay.
I've met the same error. Here is the backtrace log:
Debugger entered--Lisp error: (args-out-of-range 13655 15402)
narrow-to-region(13655 15402)
(progn (narrow-to-region (window-start) (window-end)))
(if window (progn (narrow-to-region (window-start) (window-end))))
(if scope (let ((pt (point)) min max p) (save-excursion (save-restriction (narrow-to-defun) (setq min (point-min) max (point-max) p (or (/= pt (point)) (= pt (point-max)))))) (save-excursion (and p (setq min (progn (backward-paragraph) (point)) max (progn (forward-paragraph) (point)))) (narrow-to-region min max))) (if window (progn (narrow-to-region (window-start) (window-end)))))
symbol-overlay-narrow(nil t)
(save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let ((re (symbol-overlay-regexp symbol))) (re-search-forward re nil t) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (while (re-search-forward re nil t) (symbol-overlay-put-one symbol) (or p (setq p t)))) (set-match-data save-match-data-internal 'evaporate))) (if p (progn (symbol-overlay-put-one symbol) (setq symbol-overlay-temp-symbol symbol)))))
(save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let ((re (symbol-overlay-regexp symbol))) (re-search-forward re nil t) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (while (re-search-forward re nil t) (symbol-overlay-put-one symbol) (or p ...))) (set-match-data save-match-data-internal 'evaporate))) (if p (progn (symbol-overlay-put-one symbol) (setq symbol-overlay-temp-symbol symbol))))))
(progn (symbol-overlay-remove-temp) (save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let ((re (symbol-overlay-regexp symbol))) (re-search-forward re nil t) (let ((save-match-data-internal (match-data))) (unwind-protect (progn (while ... ... ...)) (set-match-data save-match-data-internal 'evaporate))) (if p (progn (symbol-overlay-put-one symbol) (setq symbol-overlay-temp-symbol symbol)))))))
(if (and symbol (not (symbol-overlay-assoc symbol)) (not (symbol-overlay-ignored-p symbol))) (progn (symbol-overlay-remove-temp) (save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let ((re (symbol-overlay-regexp symbol))) (re-search-forward re nil t) (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal ...))) (if p (progn (symbol-overlay-put-one symbol) (setq symbol-overlay-temp-symbol symbol))))))))
(let* ((case-fold-search nil) (symbol (symbol-overlay-get-symbol t)) p) (if (and symbol (not (symbol-overlay-assoc symbol)) (not (symbol-overlay-ignored-p symbol))) (progn (symbol-overlay-remove-temp) (save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let ((re ...)) (re-search-forward re nil t) (let (...) (unwind-protect ... ...)) (if p (progn ... ...))))))))
(progn (let* ((case-fold-search nil) (symbol (symbol-overlay-get-symbol t)) p) (if (and symbol (not (symbol-overlay-assoc symbol)) (not (symbol-overlay-ignored-p symbol))) (progn (symbol-overlay-remove-temp) (save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char (point-min)) (let (...) (re-search-forward re nil t) (let ... ...) (if p ...))))))))
(if symbol-overlay-mode (progn (let* ((case-fold-search nil) (symbol (symbol-overlay-get-symbol t)) p) (if (and symbol (not (symbol-overlay-assoc symbol)) (not (symbol-overlay-ignored-p symbol))) (progn (symbol-overlay-remove-temp) (save-excursion (save-restriction (symbol-overlay-narrow symbol-overlay-scope symbol-overlay-displayed-window) (goto-char ...) (let ... ... ... ...))))))))
symbol-overlay-maybe-put-temp()
(save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))
(progn (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp)))
(if (buffer-live-p buf) (progn (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))))
(lambda (buf) (if (buffer-live-p buf) (progn (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp)))))(#<buffer *Pp Eval Output*>)
apply((lambda (buf) (if (buffer-live-p buf) (progn (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))))) #<buffer *Pp Eval Output*>)
timer-event-handler([t 0 0 500000 t (lambda (buf) (if (buffer-live-p buf) (progn (save-current-buffer (set-buffer buf) (symbol-overlay-maybe-put-temp))))) (#<buffer *Pp Eval Output*>) idle 0])
Tested with the latest code (8aa6b11) in master branch.
from symbol-overlay.
Yeah, I've been looking into this - thanks folks! I think ca3b02c should help. It turns out that when some of these timers fire, they are for in buffers that are not currently visible, yet the previous code assumed that (selected-window)
would also contain the buffer that fired the timer.
from symbol-overlay.
You'll have to restart Emacs for the fix to work, btw, because old broken timer functions will still be present in buffers.
from symbol-overlay.
Latest version is now in MELPA btw, in case anyone would like to try it out and confirm that the issue is fixed. :-)
from symbol-overlay.
Thank you for working on this, Steve. I've been trying the latest changes and so far so good. I'll report back here whether I find problems or not to give a feedback. Thanks again!
from symbol-overlay.
I can also confirm it works. Thanks.
from symbol-overlay.
OK, I've been using it all day at work with no problem.
from symbol-overlay.
I can confirm it works fine now. Close it. Thank you! @purcell
from symbol-overlay.
Thanks folks!
from symbol-overlay.
Related Issues (20)
- Is it possible to use more than 8 colors? HOT 7
- [Feature Request] Highlight current selection region as iedit did. HOT 2
- [Document Improvement Request] How to use `symbol-overlay-mode` and `symbol-overlay-isearch-literally` HOT 4
- Is that possible to persist overlay information? HOT 2
- A symbol-overlay-jump-avy function for the symbol-overlay-map HOT 7
- Tag a new release HOT 1
- Support not putting boundaries on match HOT 2
- Support other search tools, like `swiper-isearch-thing-at-point` HOT 3
- void-variable clojure-font-lock-extra-keywords HOT 7
- Symbol-overlay conflicts with haskell-mode HOT 4
- Request: Add case insensitive
- `symbol-overlay-list-all`
- Overlay conflicts with eglot HOT 4
- Adding package to NonGNU ELPA HOT 2
- Evil implementation? HOT 1
- 11749c3 breaks things HOT 6
- Cannot be used with yasnippet
- SO didn't recognize sharp quote(function quote), is this made by design or a bug?
- Jumping to next symbol (switch-forward) skips to last on screen HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symbol-overlay.