GNU bug report logs -
#44448
27.1; Strange inteference between timer, modeline/header-line and buffer position in window
Previous Next
Reported by: Amai Kinono <amaikinono <at> gmail.com>
Date: Wed, 4 Nov 2020 16:53:01 UTC
Severity: normal
Found in version 27.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
---------- Forwarded message ---------
发件人: Amai Kinono <amaikinono <at> gmail.com>
Date: 2021年8月11日周三 下午8:16
Subject: Re: bug#44448:
To: Eli Zaretskii <eliz <at> gnu.org>
> Some code in paren.el probably moves point without unwind-protect, or
something like that.
It's not. To answer you, I've created a new recipe that only moves overlay,
and
triggers the problem:
1. emacs -Q
2. M-x find-library RET paren
3. M-x split-window-horizontally
4. Go to the bottom of the file
5. M-x read-only-mode to turn off read-only-mode so we can write things
here.
Also M-x auto-save-mode to stop Emacs from auto saving it.
6. Paste and eval this:
(defvar test-overlay (make-overlay (point-min) (1+ (point-min))))
(overlay-put test-overlay 'face 'isearch)
(run-with-timer 0 0.05 (lambda ()
(let ((beg (random 5)))
(move-overlay test-overlay beg (1+ beg)))))
(defvar test-overlay2 (make-overlay (1- (point-max)) (point-max)))
(overlay-put test-overlay2 'face 'isearch)
(run-with-timer 0 0.05 (lambda ()
(let ((beg (- (point-max) (random 5))))
(move-overlay test-overlay beg (1+ beg)))))
Now we have 2 overlays dancing at the beginning and end of buffer.
7. Go to the end of ther buffer, holding C-g for several secs. You may need
to
do this several times, but there are chances that the cursor goes to the
beginning of the buffer.
Screen recording attached. For things like system information, see my last
reply to Lars.
Eli Zaretskii <eliz <at> gnu.org> 于2021年8月11日周三 下午7:43写道:
> > From: Amai Kinono <amaikinono <at> gmail.com>
> > Date: Wed, 11 Aug 2021 13:49:08 +0800
> >
> > My recent test shows this also happens when you modify overlay in the
> buffer
> > frequently. Also, a timer is not needed, it happens when it's frequent
> enough.
> >
> > Recipe:
> >
> > 1. emacs -Q
> >
> > 2. Eval this:
> >
> > (require 'paren)
> > (add-hook 'post-command-hook
> > (lambda ()
> > (let ((show-paren-mode t))
> > (show-paren-function))))
> >
> > It's a setup to run show-paren-function in post-command-hook.
> Directly using
> > show-paren-mode also cause the bug, but the chance is way lower, as it
> > delays the refreshing using a timer. It happens to me occasionally
> when I'm
> > coding with show-paren-mode on.
> >
> > 3. M-x find-library RET paren
> >
> > 4. M-x split-window-horizontally
> >
> > 5. Move to a position in the left window where there's a bunch of closing
> > parens. You should see show-paren-function is highting them for you.
> >
> > 6. Scroll the right window to a position where you can see the matching
> opening
> > parens. Now show-paren-function should highlight opening parens in
> the right
> > window, and closing parens in the left window.
> >
> > 7. Go back to the left window. Hold Ctrl and press f/b/g at the same time
> > several times (so you are sending C-f, C-b and C-g frequently)
> >
> > 8. The cursor in the left window will jump to the position of the
> > right window cursor.
>
> Some code in paren.el probably moves point without unwind-protect, or
> something like that.
>
[Message part 2 (text/html, inline)]
[overlay-bug.gif (image/gif, attachment)]
This bug report was last modified 3 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.