unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Samuel Wales <samologist@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: RE: [External] : isearch window line
Date: Tue, 22 Nov 2022 16:18:08 +0000	[thread overview]
Message-ID: <SJ0PR10MB548854EFE2C2062B4AF30812F30D9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <CAJcAo8tWZBxU9+cGMHakecO=W0=QV=STnwtb5-D+mvGwvQEfnw@mail.gmail.com>

> >> 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))

      parent reply	other threads:[~2022-11-22 16:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  1:20 isearch window line Samuel Wales
2022-11-22  2:14 ` [External] : " Drew Adams
2022-11-22  5:09   ` Samuel Wales
2022-11-22  6:51     ` Emanuel Berg
2022-11-22 13:23     ` Eli Zaretskii
2022-11-22 16:18     ` Drew Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB548854EFE2C2062B4AF30812F30D9@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).