From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: brownts@troybrown.dev, 64321@debbugs.gnu.org
Subject: bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer
Date: Wed, 28 Jun 2023 15:01:07 +0300 [thread overview]
Message-ID: <83jzvnvlrw.fsf@gnu.org> (raw)
In-Reply-To: <8D52F265-1596-4D95-BFCD-75C897412AC2@gmail.com> (message from Yuan Fu on Tue, 27 Jun 2023 21:04:22 -0700)
> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 27 Jun 2023 21:04:22 -0700
> Cc: 64321@debbugs.gnu.org,
> Eli Zaretskii <eliz@gnu.org>
>
> Thanks for the backtrace, it’s very helpful.
>
> Narrowing and widening are transparent to tree-sitter, so when the buffer widens, from tree-sitter’s POV, text are added to the buffer. Which-func calling the tree-sitter current-defund function ultimately leads to tree-sitter calling treesit—font-lock-notifier which puts text properties on the “added” portion of the buffer, which changed the modified status.
>
> treesit—font-lock-notifier should put text properties without changing modified status, like what jit-lock does. This patch should fix it.
Thanks. If this solves the problem, please install in the emacs-29
release branch.
next prev parent reply other threads:[~2023-06-28 12:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 2:23 bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer Troy Brown
2023-06-28 4:04 ` Yuan Fu
2023-06-28 12:01 ` Eli Zaretskii [this message]
2023-06-28 16:25 ` Troy Brown
2023-06-28 20:09 ` Yuan Fu
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=83jzvnvlrw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64321@debbugs.gnu.org \
--cc=brownts@troybrown.dev \
--cc=casouri@gmail.com \
/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).