[Top][All Lists]

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

Re: Line wrap reconsidered

From: Stefan Monnier
Subject: Re: Line wrap reconsidered
Date: Mon, 25 May 2020 15:31:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I’ve implemented and used a lisp-based line-wrapping feature for a while and
> it’s still sub-optimal for me. I now want to try to explore if I can add it
> directly to redisplay. 
> Here is what I come up with: in redisplay code, instead of only checking for
> whitespace, check for a ‘no-wrap text-property, if the character has this
> property, don’t wrap before[1] this character (or maybe it can be the
> opposite, only wrap when the character has a ‘can-wrap property). And this
> text property is calculated and applied once. 

I don't think I can discuss the quality of this proposal without first
understanding the intended use cases (including who/how/when the
property would be added).

> Could this be plausible? Is checking text property is fast enough for 
> redisplay?

I'll let Eli answer this part (I vaguely remember that it could be
somewhat costly, but it likely depends on the details).

> [1] There are some complications to this, some characters can’t have line
> break before them, some can’t have after; maybe  use ‘before, ‘after and nil
> instead of binary value.

Hence the need to clarify the intended use case.


reply via email to

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