GNU bug report logs - #64321
29.0.92; Tree-Sitter/which-function Narrow/Widen causes modified buffer

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Wed, 28 Jun 2023 02:25:01 UTC

Severity: normal

Found in version 29.0.92

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 64321 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: brownts <at> troybrown.dev, 64321 <at> debbugs.gnu.org
Subject: Re: bug#64321: 29.0.92; Tree-Sitter/which-function Narrow/Widen
 causes modified buffer
Date: Wed, 28 Jun 2023 15:01:07 +0300
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Tue, 27 Jun 2023 21:04:22 -0700
> Cc: 64321 <at> debbugs.gnu.org,
>  Eli Zaretskii <eliz <at> 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.




This bug report was last modified 1 year and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.