[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: word-wrap "indentation"

From: Stephen Berman
Subject: Re: word-wrap "indentation"
Date: Sat, 28 Jun 2008 00:56:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On Thu, 26 Jun 2008 10:00:55 -0400 Chong Yidong <address@hidden> wrote:

> Miles Bader <address@hidden> writes:
>> So obviously what's needed is someway to tell the display word-wrapping
>> a string to insert after each wrap-point.
>> Any comments?  Anyone already hacking on this sort of thing, or should I
>> give it a go?
> Go ahead and give it a shot.

A long time ago I started to modify longlines.el to get wrapped long
lines with indentation a la fill-prefix using a display property.  Over
time I've revised and tweaked it so that it works fairly well for my
purposes (it also supports adaptive filling and has (incomplete and too
simple) visual line-based commands), but the code is still very rough
and has some bugs I haven't been able to fix.  Now that Emacs will have
C level word wrapping, longlines.el will presumably become obsolete, and
with it my modifications.  So I'm posting it here now (attached) in the
hope that it may contain one or two ideas that the C level
implementation could adapt or extend (I am not competent to write C
level code).

If anyone wants to try it without subjecting themselves to looking at
the code, load it, then set ll-fill-prefix to a suitable string value,
e.g. "    ", and call ll-mode on a file with long lines.  Alternatively,
leave ll-fill-prefix nil and call ll-mode on a long line file that has
different levels of indentation, to see the effect of adaptive filling.

Steve Berman

Attachment: longlines_tp.el
Description: modified longlines.el with fill prefix

reply via email to

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