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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

evil-ex-search skips matches in folded regions (in org-mode) #16143

Open
sainathadapa opened this issue Sep 11, 2023 · 5 comments
Open

evil-ex-search skips matches in folded regions (in org-mode) #16143

sainathadapa opened this issue Sep 11, 2023 · 5 comments
Labels

Comments

@sainathadapa
Copy link

Description :octocat:

When using evil-ex-search-forward (/) in a org file, I should be able to navigate to matches in all regions and navigating to matches in folded regions should unfold the region.

Reproduction guide 馃

  • Start Emacs
  • Open a org file, and activate evil mode if it wasn't already
  • Collapse all sections
  • Search for a string within one of the collapsed sections

Observed behaviour: 馃憖 馃挃
No matches found

Expected behaviour: 鉂わ笍 馃槃
Evil should find the word within the collapsed section, and navigate to it. (Expand the sections if necessary)

System Info 馃捇

  • OS: darwin
  • Emacs: 29.1
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. b86a074)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((org :variables org-enable-bootstrap-support t org-want-todo-bindings t)
 auto-completion
 (spell-checking)
 syntax-checking deft emacs-lisp html lsp markdown git helm
 (osx :variables osx-command-as 'control osx-option-as 'meta osx-control-as 'hyper osx-function-as nil osx-right-command-as 'left osx-right-option-as 'left osx-right-control-as 'left osx-swap-option-and-command nil))
  • System configuration features: ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Backtrace 馃惥

N/A

@sainathadapa
Copy link
Author

sainathadapa commented Sep 11, 2023

The above issue is similar to this issue I found within doomemacs repo - doomemacs/doomemacs#6478

@davidpiano
Copy link

I'm having the same problem.

@smile13241324
Copy link
Collaborator

smile13241324 commented Nov 18, 2023

This seems to be an issue between org and evil-search as both use different methods for marking folded text.

The more modern solution for folding tests is "overlays" therefore we need to force org to use it. We can do this by setting "org-fold-core-style" to "overlays" in the org layer.

@davidpiano
Copy link

"Overlays" is less modern, not more. After reading what org gains by using its newer folding method, I'd prefer to give up evil-ex-search in return for it.

@smile13241324
Copy link
Collaborator

Sorry my mistake. Jep then lets go the other way around.

After some more reading into the details I would also go with text properties they seem to be less demanding on the CPU when appearing in huge numbers. I hope we do not loose other features by falling back to 'Isearch' though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants