From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: true "word wrap" Date: Mon, 09 Dec 2002 14:13:59 -0700 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3DF50797.5020505@ihs.com> References: <8765u94qep.fsf@squeaker.lickey.com> <87hedqh638.fsf@tc-1-100.kawasaki.gol.ne.jp> <84el8tsyp4.fsf@lucy.cs.uni-dortmund.de> <87lm31wfzy.fsf@server.crasseux.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1039476948 21607 80.91.224.249 (9 Dec 2002 23:35:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Dec 2002 23:35:48 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18LXRC-0005cE-00 for ; Tue, 10 Dec 2002 00:35:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18LVH4-0007KD-00 for gnu-help-gnu-emacs@m.gmane.org; Mon, 09 Dec 2002 16:17:10 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: fu-berlin.de 1039468438 33111980 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:107902 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4449 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4449 Bijan Soleymani wrote: > I've attached my small file. It remaps C-n and C-p to work by screen > lines instead of logical lines. I know I should make this into a minor > mode, but I am a relative newbie to emacs lisp. Have you tried screen-lines.el? It's at http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el ;;; Commentary: ;; This package provides "Screen Lines" minor mode. ;; In this minor mode, the following standard commands work in terms of ;; screen lines, as opposed to text lines when they are called interactively. ;; ;; `beginning-of-line' (C-a) ;; `end-of-line' (C-e) ;; `next-line' (C-n, down) ;; `previous-line' (C-p, up) ;; `kill-line' (C-k) ;; ;; Screen Lines minor mode should be handy when you edit a file with ;; long lines like this:
Emacs keybinding help page ;; ;; In order to test this as you see this file, proceed as follows: ;; 1: Load this package: M-x eval-buffer ;; 2: Toggle the mode for the current buffer: M-x screen-lines-mode ;; 3: Move around the above long line. ;; ;; You might want to check screenline.el written by Joshua E. Buhl ;; which does text property business properly and ;; doesn't use `defadvice' facility. ;; Or window-lines.el by enami tsugutomo which is ;; lightweight. -- Kevin Rodgers