[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reliable after-change-functions (via: Using incremental parsing in E
From: |
Stephen Leake |
Subject: |
Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) |
Date: |
Tue, 31 Mar 2020 16:57:53 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> Is it really a bug of dired-mode? Dired-mode probably has a good
>> reason to bind `inhibit-modification-hooks` to t. And if we provide
>> such feature (disabling after-change-functions), we should expect
>> people using it. Maybe there should be a reliable way to be informed
>> of buffer changes (that cannot be silenced).
>
> I agree with Stefan: it's a bug. All dired-readin needs to do is call
> the modification hooks after it's done reading in the directory. It's
> just an optimization that it inhibits the hooks while it runs: read
> the comments there and you will see why it is done.
>
> IMO, inhibit-modification-hooks is for when some code makes a
> temporary change, or a change that no one is supposed to care about,
> like changing faces. Any other case is a bug.
ada-mode occasionally binds wisi-inhibit-parse for a similar reason; it
is writing Ada source, so it is about to make several changes, during
which the buffer will be syntactically incorrect, but it will be correct
when done. The wisi after-change-functions still record changed
regions, but the parser is not called until all the changes are done.
Perhaps tree-sitter and eglot could use a similar approach.
--
-- Stephe
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), (continued)
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Yuan Fu, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs),
Stephen Leake <=
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Štěpán Němec, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/30
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Dmitry Gutov, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Stefan Monnier, 2020/03/31
- Re: Reliable after-change-functions (via: Using incremental parsing in Emacs), Eli Zaretskii, 2020/03/31