bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38740: 28.0.50; cursor-sensor-mode error in post-command-hook


From: Eli Zaretskii
Subject: bug#38740: 28.0.50; cursor-sensor-mode error in post-command-hook
Date: Sat, 15 Feb 2020 10:27:02 +0200

> From: Federico Tedin <address@hidden>
> Date: Wed, 05 Feb 2020 21:24:35 +0100
> Cc: address@hidden
> 
> > Evaluating next form in scratch buffer:
> >
> >     (with-help-window "TEST"
> >       (set-buffer standard-output)
> >       (cursor-sensor-mode 1)
> >       (insert "here"))
> >
> > Results in error:
> >
> >     Error in post-command-hook (cursor-sensor--detect): (args-out-of-range 
> > 354582)
> >
> > Looks like cursor-sensor uses scratch's window instead of "TEST" buffer 
> > window.
> >
> > I do not remember getting such error in Emacs 26, 27
> 
> I found that `cursor-sensor--detect' reads the point position from the
> buffer displayed in the selected window, and then tries to read text
> properties in that position in the current buffer. In your example,
> those two buffers are not the same, the buffer at `standard-output'
> isn't being displayed yet. I'm attaching a short patch that checks for
> this case.

LGTM, thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]