Skip to content

Conversation

@Stebalien
Copy link
Contributor

Calling isearch-exit will:

  1. Recursively edit the current search string if empty and if search-nonincremental-instead is t.
  2. Call exit-recursive-edit from isearch-done if isearch-recursive-edit is t.

In my case, this is preventing me from switching to visual-replace from isearch because isearch-recursive-edit keeps getting set (which may be a different issue...).

But, in general, this appears to be the correct way to do this:

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/isearch.el?h=57fe24961fd1df04c9df1ba790932d6545f729e8#n2404

Emacs also binds isearch-recursive-edit to nil:

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/isearch.el?h=57fe24961fd1df04c9df1ba790932d6545f729e8#n2397

But this seems unnecessary given the above change.

Calling `isearch-exit` will:

1. Recursively edit the current search string if empty and if
`search-nonincremental-instead` is `t`.
2. Call `exit-recursive-edit` from `isearch-done` if
`isearch-recursive-edit` is `t`.

In my case, this is preventing me from switching to `visual-replace`
from `isearch` because `isearch-recursive-edit` keeps getting set (which
may be a different issue...).

But, in general, this appears to be the correct way to do this:

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/isearch.el?h=57fe24961fd1df04c9df1ba790932d6545f729e8#n2404

Emacs also binds `isearch-recursive-edit` to `nil`:

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/isearch.el?h=57fe24961fd1df04c9df1ba790932d6545f729e8#n2397

But this seems unnecessary given the above change.
@szermatt szermatt merged commit 5bc3e0b into szermatt:master Oct 31, 2024
@szermatt
Copy link
Owner

Thank you for the fix!

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

Successfully merging this pull request may close these issues.

2 participants