[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display-based word wrapping
From: |
Chong Yidong |
Subject: |
Re: Display-based word wrapping |
Date: |
Sun, 22 Jun 2008 22:04:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>>> For truncate-partial-window-width OTOH, I think it would make sense to
>>> allow it to be an integer to mean "truncate if the window is less than
>>> this number". But that's unrelated to word-wrapping,
>
>> It's a good idea, and it's actually fairly closely related to
>> word-wrapping. If truncate-partial-window-width is a sufficiently small
>> number, it wouldn't interfere with word wrap for fairly large-sized
>> windows. For small windows, it would make sense to truncate instead of
>> word wrapping.
>
>> So maybe this is a good solution.
>
> Solution to what?
To the problem of how to treat truncate-partial-window-width once
word-wrapping is available as a third option for long lines (the first
two options being line truncation and simple line continuation).
Instead of adding `word-wrap' as a new value for truncate-lines, let's
say we add a new per-buffer variable, `word-wrap', which if non-nil says
to wrap lines at word boundaries rather than the middle of words. This
variable has no effect if lines are truncated instead of continued.
Then truncate-partial-window-width need not "care" about whether
non-truncation means simple line continuation or word wrapping.
Finally, by allowing truncate-partial-window-width to take integer
values as you suggested, and then setting the default to a number such
as 30, we can ensure that word wrapping can still take place for
reasonably-sized partial-width windows.
Re: Display-based word wrapping, David Kastrup, 2008/06/22
Re: Display-based word wrapping, Chong Yidong, 2008/06/22
Re: Display-based word wrapping, Miles Bader, 2008/06/22