What's LazySearch ?

LazySearch is new search mode that is based on OneKey. It can take various strings around point and search fast.

Please send suggestions and bug reports to JoeBloggs, he’s the new maintainer. Thanks! – AndyStewart

What makes LazySearch useful?

You can mark various strings around point, just type a single keystroke.
Switch various search types with a single keystroke.
Type a single keystroke to search next or previous match.
Yep, that’s me, I can’t be bothered to type more than a single keystroke for that.
You can move cursor or scroll buffer when searching.
You can use this feature to view the buffer or match different search types quickly.
You can just type a single keystroke to copy the search object.
You can translate between LazySearch and Isearch.


Download Lisp:one-key.el and Lisp:lazy-search.el
     (require 'lazy-search)
in ~/.emacs .
    1. M-x auto-install-batch RET
    2. Input “lazy-search”
(How to install Lisp:auto-install.el, see AutoInstall)
(global-set-key (kbd “M-s”) ‘lazy-search-menu)


By default, LazySearch will popup a help window when you execute the command ‘lazy-search-menu’.

w – Mark word.
b – Mark symbol.
u – Mark URL.
f – Mark file name.
m – Mark email.
x – Mark sexp.
l – Mark current line.
[ – Mark parentheses.
S – Copy search Object.
W – Copy word.
B – Copy symbol.
U – Copy url.
F – Copy file name.
M – Copy email.
X – Copy sexp.
L – Copy line.
{ – Copy parentheses.
s – Move forward.
r – Move backward.
HOME – Move first.
END – Move last.
H – Move start.
L – Move end.
down arrow – View next line.
up arrow – View previous line.
left arrow – View backward char.
right arrow – View forward char.
Ctrl-down arrow – View scroll down one line.
Ctrl-up arrow – View scroll up one line.
Page Up – View scroll down one page.
Page Down – View scroll up one page.
c – Search object cache.
Y – Search yank.
Ctrl-s – Switch to isearch.
t – Toggle keep region after quiting
E – Edit search object.
. – Return mark initiation position.
v – Moccur.
V – Moccur all.
You can customize all these keystrokes by modifying lazy-search-menu-alist.


You can bind the command ‘isearch-to-lazy-search’ with ‘isearch-mode-map’. I do it like this:
(define-key ‘isearch-mode-map (kbd “M-l”) ‘isearch-to-lazy-search).
Then type “M-l” when you are searching in isearch. Isearch will transfer its search object to LazySearch mode.





Errors out for me on Emacs 24…