unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* isearch window line
@ 2022-11-22  1:20 Samuel Wales
  2022-11-22  2:14 ` [External] : " Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2022-11-22  1:20 UTC (permalink / raw)
  To: help-gnu-emacs

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?

i searched for target line and window line on web and in the rather
well written emacs manual.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [External] : isearch window line
  2022-11-22  1:20 isearch window line Samuel Wales
@ 2022-11-22  2:14 ` Drew Adams
  2022-11-22  5:09   ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2022-11-22  2:14 UTC (permalink / raw)
  To: Samuel Wales, help-gnu-emacs

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] : isearch window line
  2022-11-22  2:14 ` [External] : " Drew Adams
@ 2022-11-22  5:09   ` Samuel Wales
  2022-11-22  6:51     ` Emanuel Berg
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Samuel Wales @ 2022-11-22  5:09 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

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.

On 11/21/22, Drew Adams <drew.adams@oracle.com> wrote:
>> 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
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] : isearch window line
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2022-11-22  6:51 UTC (permalink / raw)
  To: help-gnu-emacs

Samuel Wales wrote:

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

If there isn't a setting, Elisp wrapper or `advice-add' ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] : isearch window line
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2022-11-22 13:23 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Samuel Wales <samologist@gmail.com>
> Date: Mon, 21 Nov 2022 22:09:36 -0700
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> 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.

Do you have scroll-conservatively set to a value larger than 100?

If so, I suggest to customize scroll-margin to some non-zero value, like 3.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [External] : isearch window line
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2022-11-22 16:18 UTC (permalink / raw)
  To: Samuel Wales; +Cc: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-22 16:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).