From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ph. Ivaldi Newsgroups: gmane.emacs.help Subject: Re: How to scroll while keeping the position of the point with respect to the text? Date: Wed, 05 Sep 2007 22:38:53 +0200 Organization: A GNU/Linux user. Message-ID: <878x7konj6.fsf@tele2.fr> References: <1189019337.916627.259710@57g2000hsv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1189024934 19337 80.91.229.12 (5 Sep 2007 20:42:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2007 20:42:14 +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 22:42:13 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 1IT1hM-0002AM-I7 for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 22:42:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IT1hK-0006zR-SP for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Sep 2007 16:42:02 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.imp.ch!news.imp.ch!news.alphanet.ch!alphanet.ch!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: d90-144-64-97.cust.tele2.fr Original-X-Trace: shakotay.alphanet.ch 1189024734 7106 90.144.64.97 (5 Sep 2007 20:38:54 GMT) Original-X-Complaints-To: usenet@alphanet.ch Original-NNTP-Posting-Date: Wed, 5 Sep 2007 20:38:54 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Face: UCs{cY@n, .D_C)[lP*B#'>5ec\gQ"`B7cEmC(d=XNH}_:50I6}>sQ_+GC&PiNZ+<.[}Z]ib, DzQ}WN0r=WE>RvoiPZBF6(*pA|+=&9x5mT_P, kzLdYf5:a[h3W#8?LZS|X'[~n%O, D_fWZM1oW, 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:47251 Archived-At: Hello, You tried scroll-in-place ? http://www.cs.utah.edu/~eeide/emacs/ In .emacs: 8<------8<------8<------8<------8<------8<------8<------8<------8<------ ;; ------------------- ;; * scroll-in-place * ;; scroll-in-place is a package that keeps the cursor on the same line ;; (and in the same column) when scrolling by a page using PgUp/PgDn. (require 'scroll-in-place) (defun scroll-move-up () "* Scroll up without scroll-in-place." (interactive) (let ((scroll-in-place nil)) (scroll-up 1))) (defun scroll-move-down () "* Scroll down without scroll-in-place." (interactive) (let ((scroll-in-place nil)) (scroll-up -1))) (global-set-key (kbd "") 'scroll-move-up) (global-set-key (kbd "") 'scroll-move-down) ;; ---------------------------------- ;; * naviguer dans une ligne longue * ;; C-up et C-down pour naviguer dans une ligne longue. ;; En plus le curseur reste immobile (en fait c'est un scroll!). (defun move-one-up () (interactive) (scroll-up 1)) (defun move-one-down () (interactive) (scroll-up -1)) (global-set-key (kbd "") 'move-one-down) (global-set-key (kbd "") 'move-one-up) 8<------8<------8<------8<------8<------8<------8<------8<------8<------ -- Regards, Philippe Ivaldi. http://piprim.tuxfamily.org/