Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiper-isearch in org-mode breaks org-cycle #3015

Open
jamieforth opened this issue Mar 10, 2023 · 9 comments
Open

swiper-isearch in org-mode breaks org-cycle #3015

jamieforth opened this issue Mar 10, 2023 · 9 comments
Labels
bug compat Issues relating to backward/forward compatibility upstream Issue lies with upstream program

Comments

@jamieforth
Copy link

Maybe relates to #2457.

Using make plain (b8be491) with the build-in Org 9.3 everything works fine.

But make plain with Org 9.6.1 installed causes the following problems.

Test case 1:

  1. use the following content for org file, fold all items
* HEADING 1
** test1
* HEADING 2
** test2
* HEADING 3
** test3
  1. swiper-isearch for "test" - HEADING 1 unfolds correctly
  2. C-g - HEADING 1 folds correctly
  3. org-cycle - HEADING 1 can no longer be unfolded

Test case 2:

  1. use the same file content as above
  2. swiper-isearch for "test1" - HEADING 1 folds incorrectly
  3. ENTER - HEADING 1 unfolds correctly
  4. org-cycle works

Test case 3:

  1. use the same file content as above
  2. swiper-isearch for "test1" - HEADING 1 folds incorrectly
  3. C-g - HEADING 1 stays folded correctly
  4. org-cycle - HEADING 1 can no longer be unfolded

Environment: Debian 11, Emacs 27.1.

@slk500
Copy link

slk500 commented Apr 2, 2023

I also have this issue. But it's not so easy to reproduce. Just after using swiper in buffer, I can't unfold some headings.
GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2023-02-26
Org mode version 9.6.1 (release_9.6.1-34-geea8da)

@jamieforth
Copy link
Author

I see the same problem with Org mode version 9.6.4 (reliably reproducible).

GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2023-02-23, modified by Debian

@ahktenzero
Copy link

Same issue here, also I have display problems after searching with Swiper where a headline will fold but certain links in the contents don't get hidden when the parent headline is collapsed.

Org 9.6 changed the method for hiding folded text to use text properties instead of overlays. The docstring for org-fold-core-style mentions that using text properties may cause issues with packages which haven't been updated to be compatible with the new system. I tried to reproduce the problem in a clean Emacs with just Org and Swiper loaded and the folding style set to overlays and that seems to fix it.

Org mode version 9.6.4 (9.6.4-ge065b5)
GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-03-14, modified by Debian

@rwilson4
Copy link

Hi folks, some recent conversation on the org-mode mailing list may help: https://lists.gnu.org/archive/html/emacs-orgmode/2023-05/msg00258.html

Basically, this code: https://github.com/abo-abo/swiper/blob/master/swiper.el#L980
should call `isearch-mode-end-hook'.

HTH,
Bob

@basil-conto basil-conto added bug upstream Issue lies with upstream program compat Issues relating to backward/forward compatibility labels Jun 24, 2023
@basil-conto
Copy link
Collaborator

Hi folks, some recent conversation on the org-mode mailing list may help: https://lists.gnu.org/archive/html/emacs-orgmode/2023-05/msg00258.html

Seems to have been brought up on emacs-devel too:

Basically, this code: https://github.com/abo-abo/swiper/blob/master/swiper.el#L980 should call `isearch-mode-end-hook'.

Would you be interested in proposing a patch?

What about the other three uses of isearch-filter-predicate in swiper.el?

Thanks.

@rwilson4
Copy link

Unfortunately I don't feel confident enough in my elisp to propose a patch! Just thought I'd share the link since I'm affected by this issue as well.

@ujikol
Copy link

ujikol commented Aug 16, 2023

Any news here?

This issue is also reported on the org-mode side: https://list.orgmode.org/orgmode/875y5oo9nv.fsf@localhost/

Would you please do your testing with the Org dev branch.

@uselpa
Copy link

uselpa commented Mar 25, 2024

Hello
chiming in, because I encounter this a few times a day, and only now realised it's due to a swiper-orgmode conflict.
Is there a known workaround, or solution, at this point?
Using Emacs 29.2 on macOS, swiper from ELPA.
Regards,
-Patrick

@mngb
Copy link

mngb commented Aug 28, 2024

same issue of environment:

  • emacs 29.3
  • swiper 0.14.2
  • org 9.6.3
    reproduce:
    Open a .org file with org-startup-folded 'content,
    do swiper search some words in this org-file, and navigate forward,
    backward, it appears nearly 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compat Issues relating to backward/forward compatibility upstream Issue lies with upstream program
Projects
None yet
Development

No branches or pull requests

8 participants