
Ask HN: Emacs-like Incremental Search? - _acme
Is there a native macOS text editor that supports emacs-like incremental search, meaning that upon completion of the search, the cursor is left at the beginning of the match? If I search for &quot;apple&quot; and type &quot;ap&quot;, the cursor should be left before&#x2F;on &quot;a&quot; when I end the search; &quot;ap&quot; should not be highlighted.
======
ScottBurson
That's funny. I've used the original ITS Emacs, Zmacs (the Lisp Machine
editor), MINCE, Coral Common Lisp's FRED, GNU Emacs, XEmacs, and probably a
couple more Emacs clones I've forgotten, and I don't recall any of them having
that behavior when searching forward. (They do leave the cursor at the
beginning of the match when searching backward.)

Anyway, you can get Aquamacs and customize its behavior to your liking.

~~~
dontJudge
To save a google search, here's an emacs customization to leave cursor at the
start of the match.

From [http://endlessparentheses.com/leave-the-cursor-at-start-
of-m...](http://endlessparentheses.com/leave-the-cursor-at-start-of-match-
after-isearch.html)

    
    
        (add-hook 'isearch-mode-end-hook
                  #'endless/goto-match-beginning)
        (defun endless/goto-match-beginning ()
          "Go to the start of current isearch match.
        Use in `isearch-mode-end-hook'."
          (when (and isearch-forward
                     (number-or-marker-p isearch-other-end)
                     (not mark-active)
                     (not isearch-mode-end-hook-quit))
            (goto-char isearch-other-end)))

~~~
dontJudge
>> Is there a native macOS text editor that supports emacs-like...

Nothing more "emacs-like" than emacs. Turn on CUA mode if common key binds is
what you're after.

