From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ivan Andrus <darthandrus@gmail.com>
Cc: 11759@debbugs.gnu.org
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 [thread overview]
Message-ID: <jwvbokck379.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <0B4F1CBC-1CF3-4CA5-AD66-93DA0DD70037@ceu-budapest.edu> (Ivan Andrus's message of "Thu, 21 Jun 2012 18:27:50 +0200")
> 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
next prev parent reply other threads:[~2012-06-21 17:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 16:27 bug#11759: 24.1.50; word-wrap should wrap on non-words if the current word is too long Ivan Andrus
2012-06-21 17:09 ` Stefan Monnier [this message]
2012-06-23 11:14 ` Chong Yidong
2012-06-23 11:27 ` Lennart Borgman
2012-06-23 12:48 ` Eli Zaretskii
2012-06-23 13:06 ` Lennart Borgman
2012-06-23 15:15 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbokck379.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11759@debbugs.gnu.org \
--cc=darthandrus@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).