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 #19 received at 64321-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Troy Brown <brownts <at> troybrown.dev>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 64321-done <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 13:09:41 -0700

> On Jun 28, 2023, at 9:25 AM, Troy Brown <brownts <at> troybrown.dev> wrote:
> 
> On Wed, Jun 28, 2023 at 12:04 AM Yuan Fu <casouri <at> 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.

Cool, thanks, pushed.

Yuan



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.