unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Brown <brownts@troybrown.dev>
To: Yuan Fu <casouri@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 64321@debbugs.gnu.org
Subject: bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer
Date: Wed, 28 Jun 2023 12:25:02 -0400	[thread overview]
Message-ID: <CABvCZ40DU+3OXycMChOZBicWKZE=8H-6_CKV9yLeDZx0Lxou4g@mail.gmail.com> (raw)
In-Reply-To: <8D52F265-1596-4D95-BFCD-75C897412AC2@gmail.com>

On Wed, Jun 28, 2023 at 12:04 AM Yuan Fu <casouri@gmail.com> wrote:
>
> 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 for the explanation and the supplied patch.  I can confirm that
this patch fixes the issue.





  parent reply	other threads:[~2023-06-28 16:25 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
2023-06-28 16:25   ` Troy Brown [this message]
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='CABvCZ40DU+3OXycMChOZBicWKZE=8H-6_CKV9yLeDZx0Lxou4g@mail.gmail.com' \
    --to=brownts@troybrown.dev \
    --cc=64321@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    /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).