[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to go to next line on the screen instead of going to, next line
From: |
Sébastien Vauban |
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 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) |
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' mode
>> ;; 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
--
Sébastien Vauban
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: How to go to next line on the screen instead of going to, next line in the text?,
Sébastien Vauban <=