From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.help Subject: prevent scroll-lock-mode from scrolling? Date: Fri, 17 Jun 2016 03:12:15 +0200 Organization: my virtual residence Message-ID: <871t3waaa8.fsf@heimdali.yagibdah.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466126018 10991 80.91.229.3 (17 Jun 2016 01:13:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2016 01:13:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 17 03:13:30 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bDiLh-0002D6-JH for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Jun 2016 03:13:29 +0200 Original-Received: from localhost ([::1]:53082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDiLg-0003RH-NC for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jun 2016 21:13:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDiKk-0002bP-FN for help-gnu-emacs@gnu.org; Thu, 16 Jun 2016 21:12:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDiKh-00075T-5p for help-gnu-emacs@gnu.org; Thu, 16 Jun 2016 21:12:30 -0400 Original-Received: from acheron.yagibdah.de ([185.55.75.245]:34736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDiKg-000757-Ue for help-gnu-emacs@gnu.org; Thu, 16 Jun 2016 21:12:27 -0400 Original-Received: from heimdali.yagibdah.de ([192.168.3.20]) by acheron.yagibdah.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.85) (envelope-from ) id 1bDiKd-0000Mz-1M for help-gnu-emacs@gnu.org; Fri, 17 Jun 2016 03:12:23 +0200 Original-Received: from lee by heimdali.yagibdah.de with local (Exim 4.85) (envelope-from ) id 1bDiKc-0005og-Va for help-gnu-emacs@gnu.org; Fri, 17 Jun 2016 03:12:22 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.55.75.245 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110470 Archived-At: Hi, is there a way to prevent the point from moving up or down when scroll-lock-mode is enabled and the contents of the buffer have been scrolled so far as for the first or the last line to reach the top or the bottom of the frame, respectively? It pretty much defeats the idea of this mode when the point moves nonetheless after scrolling for a bit, since I would use this mode to keep the point in its very place when scrolling. I do understand that the point moving might be a feature allowing the point to reach every line of the buffer without having to disable scroll-lock-mode. However, my main purpose for the mode would be to review some lengthy text, particularly source code, and I'd consider it a useful feature to have to switch the mode on and off, mirroring switching between reviewing and editing. OTOH, I can even imagine modifying the mode such that when it's enabled, the point always remains within a configurable number of lines at the centre of the frame --- or at the centre of the lines, in case there can be more lines displayed than the contents of the buffer have --- while the contents of the buffer are being scrolled into position when I scroll them. There's probably such a "scroll-programming-mode" already available? Thinking of this, is there a kinda complementary mode, or an option, to scroll-lock-mode, which would move the point together with the contents of the buffer when I scroll? This would be useful to scroll in some part of the buffer content which isn't currently visible without having to leave the line the point is currently in. (I'd use the ScrollLock and Pause keys to toggle these two modes, and the "intermediate" scrolling could automatically be disabled and the point be brought back to where it was on the screen once I start typing again, like xterm does this ...) -- GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit) of 2016-03-18 on heimdali