From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [ELPA?] Controlling Isearch from the minibuffer Date: Fri, 21 May 2021 15:31:19 +0300 Message-ID: <83pmxkmfoo.fsf@gnu.org> References: <87zgx5cz33.fsf@gmail.com> <87o8djohqf.fsf@mail.linkov.net> <87eeeenxqq.fsf@gmail.com> <87h7jath3m.fsf@mail.linkov.net> <87mtt0wj37.fsf@gmail.com> <87cztvx4dc.fsf@mail.linkov.net> <87bl9fr7xh.fsf@gmail.com> <87tun6n12v.fsf@mail.linkov.net> <87lf8i8kba.fsf_-_@gmail.com> <875yzl6v3x.fsf@mail.linkov.net> <87v97i4jy7.fsf@mail.linkov.net> <87pmxqbjkm.fsf@gmail.com> <87im3cqwqz.fsf@gmail.com> <83y2c8mli7.fsf@gnu.org> <87cztke1w5.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5041"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, emacs-devel@gnu.org, juri@linkov.net To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 21 14:35:43 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lk4NT-00015h-C9 for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 14:35:43 +0200 Original-Received: from localhost ([::1]:60318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk4NS-0007nV-Ay for ged-emacs-devel@m.gmane-mx.org; Fri, 21 May 2021 08:35:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk4JS-0003JZ-0K for emacs-devel@gnu.org; Fri, 21 May 2021 08:31:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38296) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk4JK-00053G-OW; Fri, 21 May 2021 08:31:27 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1895 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk4JH-0001Pv-DS; Fri, 21 May 2021 08:31:24 -0400 In-Reply-To: <87cztke1w5.fsf@gmail.com> (message from Augusto Stoffel on Fri, 21 May 2021 13:56:26 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269551 Archived-At: > From: Augusto Stoffel > 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.