GNU bug report logs - #31666
Bad interaction between visual-line-mode and wrap-prefix on long lines

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <clement.pitclaudel <at> live.com>

Date: Thu, 31 May 2018 12:29:02 UTC

Severity: minor

Merged with 11759

Found in version 24.1.50

Full log


Message #11 received at 31666 <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <clement.pitclaudel <at> live.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 31666 <at> debbugs.gnu.org
Subject: Re: bug#31666: Bad interaction between visual-line-mode and
 wrap-prefix on long lines
Date: Thu, 31 May 2018 19:16:12 -0400
[Message part 1 (text/plain, inline)]
On 2018-05-31 11:06, Eli Zaretskii wrote:
> …
> I'm not sure I understand/agree that the above describes the same
> issue as your example.  But let's deal with the example first:
> …
> I don't see why you shouldn't expect that.  Visual Line mode breaks
> long lines on whitespace characters, and the 15 spaces with which you
> start each line provide ample opportunity for that.  

That's a good point, the behavior that I dislike doesn't even require adaptive-wrap or a wrap-prefix property.  Just having a few spaces at the beginning of a line and a very long word is enough.

> ...
> Are you saying that you expected this instead:
> 
> xxxxxxxxxxxxxxx AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>                 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 
> ?  That would be Visual Line mode missing an opportunity to break a
> long line on whitespace characters, no?

Yes, I think that's correct. If I understand correctly, the purpose of visual-line-mode is to break between word to avoid having to break inside words.  If breaking before a word doesn't prevent that word from being broken, it would seem better to not break before it.  In other words, assuming 9 columns:

Here breaking at ' ' is useful:

  Input:
  123456789
  xxx aaaaaaa

  Visual-line mode (good)
  123456789
  xxx
  aaaaaaa

But not here:

  Input
  123456789
  xxx aaaaaaaaaaaaa

  Visual-line mode (bad):
  123456789
  xxx
  aaaaaaaaa
  aaaa

  What I'd expect:
  123456789
  xxx aaaaa
  aaaaaaaa

Does this make sense?
Clément.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 5 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.