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

Trouble using outline.el functions while in Visual Line mode #1953

Open
SimonGZ opened this issue Jan 14, 2025 · 3 comments
Open

Trouble using outline.el functions while in Visual Line mode #1953

SimonGZ opened this issue Jan 14, 2025 · 3 comments

Comments

@SimonGZ
Copy link

SimonGZ commented Jan 14, 2025

Issue type

Bug (I think)

Environment

Emacs version: 30.0.93
Operating System: MacOS 15.2
Evil version: 1.15 and latest build from source (01/13/2025)
Evil installation type: Doom Emacs
Graphical/Terminal: Graphical
Tested in a make emacs session: Yes

Reproduction steps

  • Start Emacs (can be in make emacs)
  • Go to an org file with multiple headings
  • Trigger visual line mode (shift+V).
  • Try to use built-in outline.el functions like outline-next-visible-heading

Expected behavior

I would expect these functions to behave as they do when in regular visual mode (selecting to the next visible heading but including the whole line).

Actual behavior

Nothing happens. The function triggers but doesn't extend the selection to the next header.

Further notes

Is this intended behavior? Is there something I'm missing? I'm not sure if this is a bug or a feature request or just me not understanding something basic.

Thank you for your time!

@tomdl89
Copy link
Member

tomdl89 commented Jan 14, 2025

It's debatable whether this is a bug or not. Probably slightly is, but I think frequent org users often use https://github.com/Somelauw/evil-org-mode which I assume fixes this problem (I've never used it myself). I'm not entirely sure it's maintained, so if the problem persists after trying it, please report back here. Cheers

@SimonGZ
Copy link
Author

SimonGZ commented Jan 15, 2025

Unfortunately, I wasn't able to find a function in that package that helped.

Digging into this a little more and looking at the source code for outline-next-visible-heading, I've figured out that re-search-forward and search-forward work in visual mode in evil but not in visual line mode, and that seems to be the core issue.

I don't know why that doesn't work and perhaps it should be considered a bug. However isearch-forward does work in both visual modes so I'm going to see if I can make a replacement function for myself that uses that rather than the built-in outline.el functions.

Thank you for your help and please free to close this if the search-forward/re-search-forward issue isn't worthy of addressing.

@tomdl89
Copy link
Member

tomdl89 commented Jan 15, 2025

Ah, well in that case I assume this is an evil problem. I'll take a look when I get some time. Please feel free to share any fixes you come up with here.

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

No branches or pull requests

2 participants