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.help Subject: Re: Make scroll-{up, down} move point to {start, end} of newly visible text Date: Fri, 04 Aug 2023 08:31:26 +0300 Message-ID: <83msz7wez5.fsf@gnu.org> References: <83mszb0w9l.fsf@gnu.org> <83il9y22e8.fsf@gnu.org> <834jli1uhb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11086"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 07:31:37 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1qRnPU-0002mz-FL for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 07:31:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRnPE-0002e2-BU; Fri, 04 Aug 2023 01:31:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRnPA-0002do-Um for help-gnu-emacs@gnu.org; Fri, 04 Aug 2023 01:31:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRnPA-0003XE-ME for help-gnu-emacs@gnu.org; Fri, 04 Aug 2023 01:31:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+G81SZwIATsdWApIdJUWqtXWRjmXoBVXRciEvLzm6IM=; b=UOa8qxTBOLCm aeyRWXyQyMKCFxFKPF2rO3AIXMU0/riPx71jb96vQNEcGbkhLp5XfNSw7cypLoHOpaO216DVTgIzW L6ZVHckdpg4pSGqqzQpS7IW28/zWB4e0AJOenIXuEyxmtIeBNTzL7IjdFq5dVLrFgMCiKhKI4qQee e7yQfsyqyDWEknZSPHiNPuolniQZK5NeFYALXqmrQSWChEzmTqgfOGRbT4+VDb2COJnnfDBmxtC8i PVw+t4068PepXGP/2d4LKWoSocU31QBilXrmW19dxDLTDwcQwcSuVCNNXh2OtB/kH0c1e83FGvOig 38mTXCF/1N2Z3cdCs76BZw==; Original-Received: from [87.69.77.57] (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 1qRnP8-0004ik-7H for help-gnu-emacs@gnu.org; Fri, 04 Aug 2023 01:31:16 -0400 In-Reply-To: (message from Spencer Baugh on Thu, 03 Aug 2023 15:58:49 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144585 Archived-At: > From: Spencer Baugh > Date: Thu, 03 Aug 2023 15:58:49 -0400 > > > Sure. So I can have either point at EOB, or EOB at the end of the > > window, but not both at the same time. Which is bad for comint buffers, > > since they usually have point at EOB. > > > > I think this would be a good thing to improve: supporting this > > capability in scroll-margin. Unless, it already exists somehow? > > It occurs to me that one way to do this is to disallow Emacs from > scrolling past the end of a buffer. The default behavior is that with > C-l one can scroll past the end of a buffer, so there's empty space > displayed on screen. But maybe there's a way to disallow that, so the > last line of the buffer is never above the last line of the window. > > Is there a way to get Emacs to do that? Seems like the kind of thing > someone would have implemented at some point. We have this only for scrolling with the scroll bar: see scroll-bar-adjust-thumb-portion. Implementing this for every possible kind of scrolling would need changes to C code, I think, since scrolling is actually performed by the display engine. Suggest to file a feature-request bug report, and patches are welcome.