help-gnu-emacs
[Top][All Lists]
Advanced

[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: Lorenzo Isella
Subject: Re: How to go to next line on the screen instead of going to, next line in the text?
Date: Mon, 02 Jun 2008 18:41:15 +0200
User-agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)

Message: 4
Date: Mon, 02 Jun 2008 13:16:02 +0200
From: S?bastien Vauban <address@hidden>
Subject: Re: How to go to next line on the screen instead of going to
        next    line in the text?
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=utf-8

Hi,


> In emacs, if you hit the down arrow key, the cursor will go to next
> line in the text, i.e., the part after the first next '\n'.
>
> However, sometimes 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?

--8<---------------cut here---------------start------------->8---
;; 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 ""))
--8<---------------cut here---------------end--------------->8---

Seb

-- Sébastien Vauban


Hello Sebastien,
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? Any position in the emacs file can do? 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.
Cheers

Lorenzo


("emacs22-gtk")
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/20apel.el (source)...done
Loading /etc/emacs22/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/22.2/site-lisp/auctex.el (source)...
Loading /usr/share/emacs/22.2/site-lisp/tex-site.el (source)...done
Loading /usr/share/emacs/22.2/site-lisp/auctex.el (source)...done
Loading /usr/share/emacs/22.2/site-lisp/preview-latex.el (source)...done
Loading /etc/emacs22/site-start.d/50auctex.el (source)...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...done
Loading /etc/emacs/site-start.d/50ess.el (source)...
Loading regexp-opt...done
Loading /etc/emacs/site-start.d/50ess.el (source)...done
Loading /etc/emacs/site-start.d/50flim.el (source)...done
Loading /etc/emacs/site-start.d/50maxima-emacs.el (source)...done
Loading /etc/emacs/site-start.d/50noweb.el (source)...done
Loading /etc/emacs/site-start.d/50nowebm.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50pymacs.el (source)...done
Loading /etc/emacs/site-start.d/50python-mode.el (source)...done
Loading /etc/emacs/site-start.d/50slime.el (source)...
Loading /usr/share/emacs22/site-lisp/slime/slime-autoloads...done
Loading /etc/emacs/site-start.d/50slime.el (source)...done
Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done
Loading /etc/emacs/site-start.d/60cltl.el (source)...done
Loading advice...done
Loading paren...done
Loading time...done
Loading delsel...done


An error has occurred while loading `/home/iselllo/.emacs':

File error: Cannot open load file, screen-lines

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

For information about GNU Emacs and the GNU system, type C-h C-a.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]