emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA?] Controlling Isearch from the minibuffer


From: Eli Zaretskii
Subject: Re: [ELPA?] Controlling Isearch from the minibuffer
Date: Fri, 21 May 2021 15:31:19 +0300

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: juri@linkov.net,  spacibba@aol.com,  emacs-devel@gnu.org
> Date: Fri, 21 May 2021 13:56:26 +0200
> 
> > Disable and do what instead?  Emacs scrolls a window when point goes
> > out of view.  What would you like it to do instead of recentering?
> > Since this is just a window, the same options that control scrolling
> > in other windows can do it here as well.
> 
> If you evaluate the following in a sufficiently long buffer,
> 
>     (minibuffer-with-setup-hook
>         (lambda () (scroll-other-window 100))
>       (read-from-minibuffer "Pressing RET now will recenter"))
> 
> then the point will be at the top of the window.  From there, pressing
> RET shifts the window so that the point is in the middle (the point
> itself doesn't move).

read-from-minibuffer enters recursive-edit; when you exit that, Emacs
undoes any changes to windows you did during the recursive-edit, which
restores window-start point back to its original value.  Then Emacs
finds point outside the viewport, and recenters to show point.

The main point here is that you cannot (easily) affect windows while
in recursive-edit: Emacs is designed to undo any such changes.



reply via email to

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