[Top][All Lists]

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

Re: Line wrap reconsidered

From: Eli Zaretskii
Subject: Re: Line wrap reconsidered
Date: Tue, 26 May 2020 23:04:08 +0300

> From: Ihor Radchenko <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Wed, 27 May 2020 03:12:03 +0800
> >> There is no way to know if some text is table or body without major mode 
> >> adding text properties to distinguish them.
> > Of course, there is: the major mode is the one that creates the table,
> > doesn't it?  So the mode knows where the table is.
> I think we misunderstand each other here.
> I suggest to tell Emacs display backend not to wrap some text if the
> text has certain text property.

And I propose to do the opposite: force the display engine to wrap the
lines that are outside the table, and otherwise turn on
truncate-lines.  I think this will be much easier to implement, and
could even be done entirely in Lisp.

By contrast, "selective line-wrap" of the kind that you envision is
much harder to implement, especially with text properties.  For
starters, where would you put such a text property so that the display
engine sees it with 100% guarantee when it needs to display the
relevant lines?  Keep in mind that redisplay could decide to examine
only some portions of some lines in the window, it doesn't necessarily
examine all the lines shown in the window.

> Other cases include, for example, extremely long lines, which
> would slow down Emacs if wrapped. 

Extremely long lines slow down Emacs even if truncated.

reply via email to

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