On Wed, Apr 27, 2022 at 4:48 AM Ihor Radchenko <yanta...@gmail.com> wrote: > Fixed in 2d6f26c05 on main. And no, it was not that easy to fix. > Captured headlines may or may not need to be unfolded.
Thanks. I confirm that behavior is correct for folded level 1 headlines. But the problem still exists at level 2 and deeper: 1. Open emacs with an empty file: emacs test.org 2. From emacs, enable auto-revert-mode: M-x auto-revert-mode 3. From a shell, add text to the file: echo "* foo\nsome text\n** bar\nmore text\n" >>test.org 4. From emacs, cycle global visibility twice, so that the second level headline is visible but folded: S-TAB S-TAB 5. Observe the two folded headlines: * foo... ** bar... 6. From the shell, add another level 2 headline at the end of the file: echo "** baz\n" >>test.org 7. Observe that the new level 2 headline is not displayed as expected: * foo... ** bar... 8. From emacs, move the cursor onto the "** bar" headline and cycle visibility: TAB 9. Observe that the new level 2 headline still does not appear, but a misplaced folding ellipsis does appear at the end: * foo... ** bar more text ... 10. Cycle global visibility twice: S-TAB S-TAB 11. Observe the correct display of all headlines: * foo... ** bar... ** baz