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 15:42:14 +0300 Message-ID: <83mszb0w9l.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17946"; 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 14:42:46 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 1qQoi4-0004We-W5 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 14:42:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQohZ-0001qJ-Jq; Tue, 01 Aug 2023 08:42:13 -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 1qQohW-0001pg-5q for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 08:42:10 -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 1qQohV-0005Ov-U1 for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 08:42:09 -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=OtaZmKEwkfETs6sP8fak5gk60FllQSzm7Mrs2VUfUrI=; b=WCofFprloerP pVYBYv8hIDsWSjEhUVYDKkfGi3fcTu1BwYOsQjb1/zrADjrhg0/kspe+KW3Cz8dH69WuABdnA2lwt BxW7kB2FcHStrJ3NH9HVwJWDhQ6U7BxfgMtRzM7rWCBgdwnySYYDBf5iBeNlkA0hrFpm4Y+M82qyD 2ABz+twrNnx2Ts2l0fwWEQ3sRqLq7DmOOyX4wsA2fq2emh9gSJn4S+WiPb3m1TrlXaaAyUmLsK+qF apsv6qEjrODNO11QDOQ7Uhch4vCDV0FFbrv3kHjAlHCmOLUJzFqKEi/XoQ1UUcs/T4f9mBlLDypA9 xnRocTh8a5m3p6JQY7mGgQ==; 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 1qQohV-0003nJ-Bh for help-gnu-emacs@gnu.org; Tue, 01 Aug 2023 08:42:09 -0400 In-Reply-To: (message from Spencer Baugh on Mon, 31 Jul 2023 16:18:15 -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:144525 Archived-At: > From: Spencer Baugh > Date: Mon, 31 Jul 2023 16:18:15 -0400 > > > After I use scroll-up or scroll-down, I want to start reading the new > text on the screen. But it's easy to lose track of where the new text > start, especially with larger values of next-screen-context-lines. > > So, I would like scrolling to move point to the division between old and > new text. Then the location of the cursor will help me keep track of > which text is new and which text is old. I don't understand, because what you want happens here by default: scrolling always puts at the top of the window the first line of those which constitute next-screen-context-lines. So, for example, if you have next-screen-context-lines set to 5, C-v will put the 5th line from the window's bottom at the top screen line. If by "new text start" you mean the first line that was not visible in the window before C-v, then set scroll-margin to the value of next-screen-context-lines, and then Emacs will put point at that first new line. Is that what you want?