unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Sébastien Vauban" <zthjwsqqafhv-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
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	[thread overview]
Message-ID: <87d4my1vcz.fsf@mundaneum.com> (raw)
In-Reply-To: mailman.12563.1212424885.18990.help-gnu-emacs@gnu.org

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


       reply	other threads:[~2008-06-03 13:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12563.1212424885.18990.help-gnu-emacs@gnu.org>
2008-06-03 13:49 ` Sébastien Vauban [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
2008-06-02 16:41 How to go to next line on the screen instead of going to, " Lorenzo Isella
  -- 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=87d4my1vcz.fsf@mundaneum.com \
    --to=zthjwsqqafhv-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.org \
    /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).