help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : isearch window line


From: Drew Adams
Subject: RE: [External] : isearch window line
Date: Tue, 22 Nov 2022 16:18:08 +0000

> >> point ended up at the bottom line of the window, which was not useful,
> >> because i wanted to know what was below it.  idk if this is default in
> >> my version of emacs.  what does one do to allow a bit of context?  or
> >> perhaps keep point in center?
> >
> > C-l
>
> i meant, without you having to do c-l or so.  i kind of expected
> isearch to find it a few lines above window bottom.

There are several possibilities.  It depends on
what you want.  Eli gave probably the best answer,
for what it sounds like you want.

If you want to reposition (scroll) to show more
context at each movement to a search hit, then
you can try something like this, which recenters
at each search-hit visit:  

(add-hook 'isearch-update-post-hook #'recenter)

For "a few lines above window bottom", change
`recenter' to `foo': (defun foo () (recenter -3))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]