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

Issues when invoking ctrlf multiple times in different windows #91

Open
jdtsmith opened this issue Apr 10, 2021 · 3 comments
Open

Issues when invoking ctrlf multiple times in different windows #91

jdtsmith opened this issue Apr 10, 2021 · 3 comments

Comments

@jdtsmith
Copy link

In a browser, you can easily start separate searches that are tied to that window, leave that search active, switch to another tab or window, and start or resume a search there. CTRLF obviously can't do this, but also doesn't report anything if you try (Ctrl-s remain silent fails if a search is running in another window elsewhere). ctrlf-forward-symbol-at-point on another window/frame during a ctrlf search does do something: it deletes everything else in the buffer except the symbol at point!

What should ctrlf do? Perhaps follow isearch, and silently abandon the pre-existing search and just start a new one in the current buffer.

@raxod502
Copy link
Member

Ah, yes, I see what you mean. Unfortunately, Emacs doesn't really have an interface that could be used for multiple concurrent searches like this. You can have multiple active minibuffers (see enable-recursive-minibuffers), but they have a strict ordering: it's like a stack. You can't, to my knowledge, switch which minibuffer in the stack is active/visible.

In light of that, your suggestion to automatically abort the existing search when a new one is started seems like a good one. That should be doable by updating the logic in ctrlf-forward and ctrlf-backward, although since aborting a search means exiting a recursive edit, we may have to abuse an idle timer to start the new search after aborting the current one.

Either way, the current behavior is clearly buggy, in the ways that you point out. (And I discovered another failure condition, which is that it's possible to get the search result highlighting to stick around in a buffer even after the search is exited.)

@sa1
Copy link

sa1 commented Dec 13, 2021

Any updates on this? I hit these failure conditions often.

@raxod502
Copy link
Member

No, unfortunately, I don't have enough time to actively implement new features and bugfixes at the moment in CTRLF. But I do promise to review and merge a pull request to the effect.

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

No branches or pull requests

3 participants