[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives arg
From: |
Stefan Monnier |
Subject: |
bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer |
Date: |
Wed, 21 Feb 2024 09:30:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli wrote:
> I think cursor-sensor is written under the assumption that the
> selected window's buffer is also the current buffer, and if so,
> magit-post-command-hook should abide by that protocol. Stefan, am I
> right?
Not `cursor-sensor.el` in its entirety, but
`cursor-sensor-move-to-tangible` presumes that it is called with the
current-buffer already set to (window-buffer window).
StrawberryTea wrote:
> Why exactly are the window-buffer and the current-buffer different?
Good question. AFAIK the code that runs `post-command-hook` normally
tries to avoid such situations.
> I think this has to do with persp-mode. My guess is that when it sets
> the new window configuration, the current-buffer is not updated to the
> new window’s buffer immediately.
Could be a "bad citizen" on `post-command-hook`, indeed, which messes up
subsequent functions on the hook. Maybe the code that runs
`post-command-hook` should be more careful to (re)set current-buffer
after each function, but it seems easier to fix the rare functions which
mess it up.
Stefan
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, StrawberryTea, 2024/02/18
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, Eli Zaretskii, 2024/02/19
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, StrawberryTea, 2024/02/20
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, Eli Zaretskii, 2024/02/21
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer,
Stefan Monnier <=
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, StrawberryTea, 2024/02/21
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, Eli Zaretskii, 2024/02/22
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, Jonas Bernoulli, 2024/02/22
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, Stefan Monnier, 2024/02/22
- bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer, StrawberryTea, 2024/02/22