When I do reverse incremental search, the cursor is placed at the beginning of a match for my search, and stays there as I type further characters that match. With forward search, on the other hand, the cursor moves forward as I continue to type matching letters. Is there a way to do a forward search that behaves like backward search in this respect? (To place the cursor at the beginning of a match, I first do a forward search, then do a reverse search. I'd like to avoid this, if possible.)
1 Answer
I have the this in my init taken from the emacswiki to solve this:
(defun my-goto-match-beginning ()
(when (and isearch-forward isearch-other-end)
(goto-char isearch-other-end)))
(add-hook 'isearch-mode-end-hook 'my-goto-match-beginning)
If you leave the search, the point will jump to the beginning automatically.
-
Thanks. (Can't upvote yet.) Found that Emacs wiki page here, for others who may be interested: emacswiki.org/emacs/IncrementalSearch– ASXAug 23, 2015 at 1:11