From: Lorenzo Isella <lorenzo.isella@gmail.com>
To: zthjwsqqafhv@spammotel.com
Cc: help-gnu-emacs@gnu.org
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 [thread overview]
Message-ID: <484422AB.8020204@gmail.com> (raw)
Message: 4
Date: Mon, 02 Jun 2008 13:16:02 +0200
From: S?bastien Vauban <zthjwsqqafhv@spammotel.com>
Subject: Re: How to go to next line on the screen instead of going to
next line in the text?
To: help-gnu-emacs@gnu.org
Message-ID: <87k5h8ytn1.fsf@mundaneum.com>
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.
next reply other threads:[~2008-06-02 16:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 16:41 Lorenzo Isella [this message]
[not found] <48456c51.131e640a.2218.2323SMTPIN_ADDED@mx.google.com>
2008-06-03 23:34 ` How to go to next line on the screen instead of going to,, next line in the text? Lorenzo Isella
[not found] ` <mailman.12640.1212536111.18990.help-gnu-emacs@gnu.org>
2008-06-04 6:42 ` How to go to next line on the screen instead of going to, , " Sébastien Vauban
[not found] <mailman.12563.1212424885.18990.help-gnu-emacs@gnu.org>
2008-06-03 13:49 ` How to go to next line on the screen instead of going to, " Sébastien Vauban
-- strict thread matches above, loose matches on Subject: below --
2008-05-31 1:09 How to go to next line on the screen instead of going to " xz
2008-05-31 5:34 ` Giorgos Keramidas
2008-06-03 16:35 ` xz
2008-06-04 13:24 ` Kevin Rodgers
[not found] ` <mailman.12656.1212585897.18990.help-gnu-emacs@gnu.org>
2008-06-04 14:48 ` xz
2008-06-04 14:53 ` xz
2008-06-05 5:41 ` Kevin Rodgers
[not found] ` <mailman.12677.1212644531.18990.help-gnu-emacs@gnu.org>
2008-06-05 15:05 ` xz
2008-05-31 19:29 ` B. T. Raven
2008-06-02 11:16 ` Sébastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484422AB.8020204@gmail.com \
--to=lorenzo.isella@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=zthjwsqqafhv@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).