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: Tue, 01 Aug 2023 21:35:28 +0300 Message-ID: <834jli1uhb.fsf@gnu.org> References: <83mszb0w9l.fsf@gnu.org> <83il9y22e8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13486"; 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 Tue Aug 01 20:36:09 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 1qQuE5-0003Jb-Fk for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 20:36:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQuDO-0002VH-AM; Tue, 01 Aug 2023 14:35:26 -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 1qQuDL-0002V3-KK for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 14:35:23 -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 1qQuDL-0004E0-CK for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 14:35:23 -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=wqYwyRGJCSpp9kizpG6kv9vJrrURo1uTcJIMl6s0w9M=; b=NVzzsKHhe9T5 83xLtqHhNPuR+dVjfRIwkxZdVup/YWLs7aH7uvdHGzML6K1oyLsL5B4dqNFsND4jMhvC8cBnRsCAM Ev45KSPwdH1HEfJXMpFsZKOJGFJkua4QaCe8fvHs1SKZPALEuUorEt1/gYRzumVjmwVY/JpOUvQRy 8wnxuOPEBWmTKWZ2hGDOffoBbNQ32pHBU+2TqderyynsJlrlSUl1tn8B//Cm7BJYOff3Adb95gSx5 YcLG2EjZMp6Op/wjhei5Tcw6yt620yCLqmkJcFKN3U+wSMmfYSFeQlmCMTwP07UrbeKnqE9NY6UlX SM6GTMWtOVX2FPCoe9N6Ww==; 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 1qQuDK-0006yl-Ro for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 14:35:23 -0400 In-Reply-To: (message from Spencer Baugh on Tue, 01 Aug 2023 14:09:47 -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:144539 Archived-At: > From: Spencer Baugh > Date: Tue, 01 Aug 2023 14:09:47 -0400 > > An issue with a solution based on scroll-margin is that scroll-margin > applies even when at the end of the buffer. I'd like to be able to have > the end of the buffer at the end of the window, to maximize the amount > of content on-screen at a time. > > In particular comint buffers, like async-shell-command and compilation > and shell-mode, become quite ugly with scroll-margin on, since in such > buffers one is generally always at the end of the buffer. > > Is there a way to teach scroll-margin to not do automatic scrolling when > point is near the end of the buffer? You _can_ have EOB at the end of the window, you just cannot move point into the margin without causing a scroll. > > IOW, scrolling by single lines or a small number of lines is very > > similar to scrolling with down-arrow or up-arrow, and those already > > behave like you want. So why not use arrows instead? > > With the arrows I would have to move point to the top or end of the > screen before scrolling, which is annoying. Nothing 2 or 3 C-l's cannot fix, right? > Also, arrows move point, and it might be nice to be able to scroll > without moving point. Scrolling by a small number of lines will eventually move point as well. > scroll-up-line and scroll-down-line would work well for me, but they > don't have key bindings by default. If they did, I'd use them. I have these since about forever: (global-set-key "\M-z" (function (lambda () (interactive) (scroll-down 1)))) (global-set-key "\C-z" (function (lambda () (interactive) (scroll-up 1)))) But I don't see a need to force my preferences on everyone else, especially since C-z has a useful binding which many prefer to keep.