@matteol answered your question. Here is some further info about this.
During Isearch, keys you press that are defined in isearch-mode-map
act according to their bindings there. Keys that are not defined in that keymap act as they would outside Isearch.
By default, C-b
is not bound in isearch-mode-map
, and its global-map
binding of backward-char
is invoked when you use it during Isearch. That exits Isearch. Likewise for <left>
(bound to left-char
globally) and other cursor-movement keys.
If you use Isearch+ then you can customize user option isearchp-initiate-edit-commands
to specify that various commands (typically cursor movement commands) should not exit Isearch but should instead initiate Isearch edit.
This is a convenience feature, so you can just hit <left>
or C-b
to both: (1) initiate editing of the Isearch pattern and (2) move the cursor within that pattern. This is so convenient that by default the option value does include both <left>
and C-b
(as well as M-<left>
, M-b
, C-M-<left>
, and C-M-b
, which back the cursor up by a word and a sexp, respectively).
C-h v isearchp-initiate-edit-commands
says:
isearchp-initiate-edit-commands
is a variable defined in isearch+.el
.
Its value is (backward-char left-char backward-sexp backward-word left-word)
This variable can be risky when used as a file-local variable.
Documentation:
Commands whose key bindings initiate Isearch edit.
When invoked by a key sequence, Isearch edits the search string,
applying the command to it immediately.
Commands you might want to include here are typically commands that
move point to the left, possibly deleting text along the way.
Set this to nil
if you always want all such commands to exit Isearch
and act on the buffer text.
You can customize this variable.