[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locked narrowing in ELisp
From: |
Eli Zaretskii |
Subject: |
Re: locked narrowing in ELisp |
Date: |
Wed, 17 Aug 2022 16:55:22 +0300 |
> Date: Wed, 17 Aug 2022 16:40:01 +0300
> Cc: emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> > Could be, but unless we go through the whole C code looking for checks
> > of BEGV/ZV and updating the code to also check the "soft bounds" this
> > won't work reliably enough to replace existing uses of narrowing.
>
> The point is to avoid doing that. If we can.
>
> For instance, use two overlays in the current buffer with `invisible'
> property rather than have the display engine refer to the new kind of
> narrowing bounds.
That's a time bomb waiting to go off, because invisible text is
handled at a relatively high level in the display engine, and
otherwise the invisible property is largely ignored in Emacs.
Moreover, it will make redisplay slower. Skipping invisible text is
faster than iterating through it, but it still takes time, whereas not
going beyond BEGV..ZV is instantaneous.
And finally, I don't think I see the benefit of this, even if it'd
work: you want to get rid of (save-restriction (widen)), but you are
willing to have to replace that with tests of overlays and invisible
text all over the place?
- locked narrowing in ELisp, Stefan Monnier, 2022/08/16
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/16
- Re: locked narrowing in ELisp, Stefan Monnier, 2022/08/16
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/16
- Re: locked narrowing in ELisp, Stefan Monnier, 2022/08/17
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/17
- Re: locked narrowing in ELisp,
Eli Zaretskii <=
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/17
- Re: locked narrowing in ELisp, Eli Zaretskii, 2022/08/17
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/17
- Re: locked narrowing in ELisp, Stefan Monnier, 2022/08/17
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/18
- Re: locked narrowing in ELisp, Eli Zaretskii, 2022/08/18
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/18
- Re: locked narrowing in ELisp, Eli Zaretskii, 2022/08/19
- Re: locked narrowing in ELisp, Dmitry Gutov, 2022/08/21
Re: locked narrowing in ELisp, Eli Zaretskii, 2022/08/17