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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  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 13:26   ` Ihor Radchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-28 10:43 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> 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]".

Confirmed.
Part of the problem is some undocumented behaviour of isearch.
I will need to consult Emacs devs before fixing.

-- 
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>


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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  2022-12-28 10:43 ` Ihor Radchenko
@ 2022-12-29  2:21   ` Samuel Wales
  2022-12-29  9:37     ` Ihor Radchenko
  2022-12-29 13:26   ` Ihor Radchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2022-12-29  2:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Matt Lundin, emacs-orgmode

possibly related: are links still not searchable with iserch without
being in reveal mode or similar?  [9.4 here.)

On 12/28/22, Ihor Radchenko <yantar92@posteo.net> wrote:
> Matt Lundin <mdl@imapmail.org> writes:
>
>> 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]".
>
> Confirmed.
> Part of the problem is some undocumented behaviour of isearch.
> I will need to consult Emacs devs before fixing.
>
> --
> 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>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  2022-12-29  2:21   ` Samuel Wales
@ 2022-12-29  9:37     ` Ihor Radchenko
  2022-12-30  5:59       ` Samuel Wales
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-29  9:37 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Matt Lundin, emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> possibly related: are links still not searchable with iserch without
> being in reveal mode or similar?  [9.4 here.)

Unrelated.
The reported issue is related to the new org-fold implementation.

The old issue with searching links is known. It is simply because
isearch does not support searching inside invisible text. And links are
abbreviated by applying invisible text property to the hidden parts.

You either upgrade or set isearch-invisible to t.

-- 
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>


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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  2022-12-28 10:43 ` Ihor Radchenko
  2022-12-29  2:21   ` Samuel Wales
@ 2022-12-29 13:26   ` Ihor Radchenko
  2023-01-16  9:32     ` Ihor Radchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-29 13:26 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Part of the problem is some undocumented behaviour of isearch.
> I will need to consult Emacs devs before fixing.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60399

-- 
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>


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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  2022-12-29  9:37     ` Ihor Radchenko
@ 2022-12-30  5:59       ` Samuel Wales
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Wales @ 2022-12-30  5:59 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Matt Lundin, emacs-orgmode

more below.

On 12/29/22, Ihor Radchenko <yantar92@posteo.net> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>> possibly related: are links still not searchable with iserch without
>> being in reveal mode or similar?  [9.4 here.)
>
> Unrelated.
> The reported issue is related to the new org-fold implementation.

ok didn't men to lower s/n.

tanks for your patience.

>
> The old issue with searching links is known. It is simply because
> isearch does not support searching inside invisible text. And links are
> abbreviated by applying invisible text property to the hidden parts.

>
> You either upgrade or set isearch-invisible to t.


i look forward to it if it is fixed.  fwiw i vaguely thought the issue
was overlays or so, as the default value is 'open.  but it sounds like
you are saying this was fixed in emacs or org.  i do have a vague
inkling that it was fixed in future emacs or org.


>
> --
> 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>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


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

* Re: [Bug] isearch errors when org-fold-core-style is 'overlays
  2022-12-29 13:26   ` Ihor Radchenko
@ 2023-01-16  9:32     ` Ihor Radchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Ihor Radchenko @ 2023-01-16  9:32 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Part of the problem is some undocumented behaviour of isearch.
>> I will need to consult Emacs devs before fixing.
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60399

There seems to be no easy way to fix isearch yet retaining the ability
to obey `org-fold-show-context-detail'.  I have disabled
`org-fold-show-context-detail' when revealing folds temporarily +
`org-fold-core-style' = 'overlays.

Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=df4a5d86d

-- 
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>


^ 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).