From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Newsgroups: gmane.emacs.help Subject: Re: How to go to next line on the screen instead of going to, next line in the text? Date: Tue, 03 Jun 2008 15:49:48 +0200 Organization: Sebastien Vauban Message-ID: <87d4my1vcz.fsf@mundaneum.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1212504046 7566 80.91.229.12 (3 Jun 2008 14:40:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2008 14:40:46 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Jun 03 16:41:26 2008 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 1K3XhW-0000i4-LL for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jun 2008 16:41:26 +0200 Original-Received: from localhost ([127.0.0.1]:45109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3Xgk-0001BL-ER for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jun 2008 10:40:38 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!aotearoa.belnet.be!news.belnet.be!feed1.news.be.easynet.net!reader0.news.be.easynet.net!not-for-mail Original-Newsgroups: gnu.emacs.help X-Www-site: Under construction... X-Archive: encrypt User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:y0LC8lQfwrawlEJsJxFm6Ii3GME= Original-Lines: 66 Original-NNTP-Posting-Date: 03 Jun 2008 13:49:48 GMT Original-NNTP-Posting-Host: 81.188.7.152 Original-X-Trace: 1212500988 reader0.news.be.easynet.net 1598 [::ffff:81.188.7.152]:19067 Original-X-Complaints-To: abuse-sq41lydJq48WI+UwmH2aBQ@public.gmane.org Original-Xref: news.stanford.edu gnu.emacs.help:159084 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.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-mXXj517/zsQ@public.gmane.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:54439 Archived-At: Hi Lorenzo, >>> [...] When the line is long and is wrapped into several >>> lines on the screen, I wanna move between the screen lines, >>> instead of the text lines. How to do that? >> >> ;; point motion by screen lines (as opposed to text lines) >> ;; TODO screen lines mode enabled by default for all buffers >> (when (require 'screen-lines) >> ;; following lines commented out for keeping the original `kill-line' >> ;; in `screen-lines' minor mode >> (add-hook 'screen-lines-load-hook >> (lambda () >> (ad-disable-advice 'kill-line 'around 'screen-lines) >> (ad-activate 'kill-line))) >> >> ;; nothing should appear in the mode line, when the `screen-lines' m= ode >> ;; is enabled in a buffer >> (setq screen-lines-minor-mode-string "")) > > I tried out your suggestion (I basically cut and pasted your > small code into my .emacs file), but there must be something > that emacs does not like. > > First of all, was I supposed to simply introduce those lines > in my .emacs file? Yes. > Any position in the emacs file can do? Yes and no. Normally yes. But depends a bit on the rest of the `.emacs' file: sometimes, badly written code can override (or conflict) with other declarations elsewhere. > I installed emacs 22.1 with gtk from the standard Debian > testing repositories and I have my own .emacs file for some > simple customization. In the following, I report the error > message returned by emacs. > > [...] > > An error has occurred while loading `/home/iselllo/.emacs': > > File error: Cannot open load file, screen-lines In fact, this message is quite clear: Emacs does not find the file `screen-lines(.el)', as requested by the `require' command. So, in order to get that chunk of code working, you need to download the package `screen-lines.el' and put that file into a directory that's in your load-path (same directory as your `.emacs' file would do, for example). Get the package from there: http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el Best regards, Seb --=20 S=C3=A9bastien=C2=A0Vauban