emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lower-level change hook immune to with-silent-modifications


From: Yuan Fu
Subject: Lower-level change hook immune to with-silent-modifications
Date: Thu, 16 Jun 2022 19:25:33 -0700

> 
> Would it be possible to expose ts_record_change to Elisp?
> 
> I am asking in the interest of Org mode parser that is also parsing the
> buffer AST and tracks buffer modifications.
> 
> The built-in after-change-functions are not reliable because they can be
> (and often are) easily suppressed by with-silent-modifications macro.
> See bug#46982 and bug#51766.

I think you probably want a separate hook just for this purpose, rather than 
repurposing ts_record_change. We could have a lower-level 
after-change-functions that is immune to with-silent-modifications. Whether we 
should add such hook is probably another discussion. (So I opened a new 
thread.) I think it will be handy, but I don’t know that problem it might cause.

Yuan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]