From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 69259@debbugs.gnu.org, Jonas Bernoulli <jonas@bernoul.li>,
StrawberryTea <look@strawberrytea.xyz>
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 [thread overview]
Message-ID: <jwvcyspc338.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86zfvum21y.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 Feb 2024 14:31:21 +0200")
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
next prev parent reply other threads:[~2024-02-21 14:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-18 21:08 bug#69259: 30.0.50; (get-pos-property 9483 'cursor-intangible) gives args-out-of-range error in folded magit buffer StrawberryTea
2024-02-19 12:27 ` Eli Zaretskii
2024-02-20 15:42 ` StrawberryTea
2024-02-21 12:31 ` Eli Zaretskii
2024-02-21 14:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-02-21 23:29 ` StrawberryTea
2024-02-22 6:42 ` Eli Zaretskii
2024-02-22 15:17 ` Jonas Bernoulli via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-22 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-22 17:15 ` StrawberryTea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvcyspc338.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=69259@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jonas@bernoul.li \
--cc=look@strawberrytea.xyz \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).