From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yevgeniy Makarov Newsgroups: gmane.emacs.help Subject: How to scroll while keeping the position of the point with respect to the text? Date: Wed, 05 Sep 2007 19:08:57 -0000 Organization: http://groups.google.com Message-ID: <1189019337.916627.259710@57g2000hsv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1189021316 6875 80.91.229.12 (5 Sep 2007 19:41:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2007 19:41:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 05 21:41:56 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IT0l0-00029f-CA for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 21:41:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IT0ky-0001Te-NU for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 15:41:44 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.glorb.com!postnews.google.com!57g2000hsv.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 193.52.24.125 Original-X-Trace: posting.google.com 1189019338 6945 127.0.0.1 (5 Sep 2007 19:08:58 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 5 Sep 2007 19:08:58 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 57g2000hsv.googlegroups.com; posting-host=193.52.24.125; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:151723 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47247 Archived-At: Hello, I am looking for a way to scroll text vertically without moving the position of point with respect to the text. I'd like to do this frequently when I am prepared to edit something and would like to see a bit more of the context without moving the point from the selected position. I know that this is what the recenter function does; however, it asks for the screen line number where to put the point, and I would like for this to be determined automatically by adding or subtracting 1 from the current line number. If the point is on the top window line, it would be natural to do (scroll-up 1) instead of recenter, and similarly for the bottom line. In this case, of course, the position of the point with respect to the text would change. If there is no such standard command, I could one myself, but with changing line height I found a little tricky to figure out whether the point is on the bottom or top line in the window. Is there a convenient way to do this? Thank you, Yevgeniy