From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eric Eide Newsgroups: gmane.emacs.help Subject: Re: Is there a way to move to next line in wrapped text? Date: Wed, 07 Jan 2004 08:58:17 -0700 (MST) Organization: University of Utah School of Computing Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073492709 1150 80.91.224.253 (7 Jan 2004 16:25:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jan 2004 16:25:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 07 17:25:03 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeGUQ-0007Ab-00 for ; Wed, 07 Jan 2004 17:25:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeH3u-0000oV-IP for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Jan 2004 12:01:42 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!ihnp4.ucsd.edu!dog.ee.lbl.gov!news.cc.utah.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: ioka.flux.utah.edu Original-X-Trace: coward.ks.cc.utah.edu 1073491101 16554 155.98.60.84 (7 Jan 2004 15:58:21 GMT) Original-X-Complaints-To: abuse@cc.utah.edu Original-NNTP-Posting-Date: 7 Jan 2004 15:58:21 GMT User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.1 (Cuyahoga Valley, berkeley-unix) Cancel-Lock: sha1:uaOOBQwzwHeACRvLcW2bieuTbdA= Original-Xref: shelby.stanford.edu gnu.emacs.help:119837 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:15778 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15778 "Jeff" == Jeff writes: Jeff> [...] when I do Ctrl-p or Ctrl-n to move up or down a line, it Jeff> goes to the next line in terms of linefeeds, not in terms of Jeff> wrapped text. Are there keybindings I don't know about that will Jeff> move up and down to the next 'literal' line in the window? Jeff> (regardless of where linefeeds are?). If not, is there some other Jeff> way to do this? The `scroll-in-place' package can help you with this. Get it from: Or if you are using XEmacs, you can get it as part of the XEmacs distribution. Load the `scroll-in-place' package into your Emacs session, and then you can use C-u 1 C-v to move the cursor down screen one line ("scroll up") C-u 1 M-v to move the cursor up one screen line ("scroll down") Of course, `C-u 1 PgDown' and `C-u 1 PgUp' work just as well. The keys `C-u 1' tell the scrolling commands how many lines to move, and it turns out that the `scroll-in-place' commands remember the number of lines you want to scroll, across a sequence of scrolling commands. In other words, you don't have to type `C-u 1' every time. As long as you keep doing C-v and M-v without interruption, you'll keep moving by the same distance each time. To make one-line scrolling more convenient, you might want to define you own one-line scrolling commands and bind them to keys --- something like this: (defun scroll-down-one-line (arg) "Scroll down one line, or number of lines specified by prefix arg." (interactive "P") (let ((scroll-default-lines 1)) (scroll-down-in-place arg))) (global-set-key "\C-c\C-v" 'scroll-down-one-line) The documentation in the `scroll-in-place.el' file comments (in the "advanced customization" section) go into more detail about writing your own scrolling commands. Eric. -- ------------------------------------------------------------------------------- Eric Eide . University of Utah School of Computing http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX