[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11759: 24.1.50; word-wrap should wrap on non-words if the current wo
From: |
Stefan Monnier |
Subject: |
bug#11759: 24.1.50; word-wrap should wrap on non-words if the current word is too long |
Date: |
Thu, 21 Jun 2012 13:09:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> Setting word-wrap is generally a very nice addition and I like it even
> when programming. However it can cause annoying behavior when the
> "words" are very long. For example if the entire line is one "word" but
> indented, which is not uncommon in some files that I regularly edit,
> then the entire line is wrapped to the next line leaving a completely
> blank visual line. Arguably this is bad programming style, but it would
> be nice if I could specify a maximum length for a "word". If it would
> require breaking longer than this limit, then it should break as if
> word-wrap were off.
I also use word-wrap everywhere, including programming modes and see the
same problem. A word-size-limit might do the trick, but there are a few
cases where we don't even need that, I think:
- if the word is the first non-blank char on the line, wrapping to the
next line results in a visually empty line, losing the
indentation info.
- if the word is wider than the window (plus the wrap-prefix), then even
after word-wrapping it to the next line, it gets char-wrapped anyway,
so we didn't win anything.
I don't know if those two cases cover all interesting situations, but at
least I think it's worth trying to address them first.
Stefan