Subject: Re: bug#58928: 29.0.50; overlays in org-mode are disrupted after call `org-capture`

From: Ihor Radchenko <[email-masked]>
Date: Tue, 01 Nov 2022 09:07:26 +0000

Gerd Möllmann <[email-masked]> writes:

> What I see now is that I have 2 windows.  One is showing test.org, the
> other is a buffer CAPTURE-test.org.  While typing in CAPTURE-test.org,
> the text in test.org is mangled with each key stroke.  The invisible
> parts (...) are moved around in test.org.  C-l doesn't change anything.
>
> Running with --enable-checking and ASAN doesn't show anything.
>
> Do we have someone who knows Org internals, and can tell what exactly 
> typing in CAPTURE-test.org does, presumably with overlays?

I cannot reproduce using somewhat old Emacs 29
Development version 41d3d71a1e67 on master branch; build date 2022-10-28.

I can reproduce after updating to the latest master.

FYI, CAPTURE-test.org is nothing but a narrowed indirect buffer.
In this particular case, CAPTURE-test.org is narrowed to 1..4 before you
start typing. You can widen it and will see that it is still the
original Org file.

Note that test.org itself is also narrowed, which should not happen.
Although, narrowing of test.org during capture can also be seen using
Emacs 28.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>