emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] isearch errors when org-fold-core-style is 'overlays
@ 2022-12-27 19:00 Matt Lundin
  2022-12-28 10:43 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Lundin @ 2022-12-27 19:00 UTC (permalink / raw)
  To: emacs-orgmode

I'm finding that isearch fails to unfold the correct region or to search
in the correct region when there are folded regions in a buffer and
`org-fold-core-style` is set to 'overlays.

Here is a minimal recipe for reproducing the bug:

Use a minimal emacs startup file:

--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/org-mode/lisp/")
(setq org-startup-folded t)
(setq org-fold-core-style 'overlays)
--8<---------------cut here---------------end--------------->8---

Open the following file:

--8<---------------cut here---------------start------------->8---
* One
word
* Two
word
--8<---------------cut here---------------end--------------->8---

Issue #1:

Go to the beginning of headline "Two" when the trees are folded.

Type "M-x isearch word [RET]".

Expected behavior: isearch should reveal the entry under headline two
and shift the highlighted region dynamically as the characters typed
begin to match.

What happens: the beginning of the highlighted region remains stuck at
the beginning of the headline and the entry does not unfold until after
the return key is pressed.

Issue #2:

Cycle headlines to folded state. Go to the beginning of headline "Two".

Type "M-x isearch word [RET]".

Note that during this second search dynamically highlighted region
expands to include the folded headline "One". Once return is pressed,
isearch reveals the entry under headline "One" and moves the point to
the "word" there. 

After running git bisect, I traced the issue to commit
6cd7c6fb1cf6363f1057086760bed9875cdd97c7

Thanks,

Matt


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-16  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-27 19:00 [Bug] isearch errors when org-fold-core-style is 'overlays Matt Lundin
2022-12-28 10:43 ` Ihor Radchenko
2022-12-29  2:21   ` Samuel Wales
2022-12-29  9:37     ` Ihor Radchenko
2022-12-30  5:59       ` Samuel Wales
2022-12-29 13:26   ` Ihor Radchenko
2023-01-16  9:32     ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).