all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* trouble indenting looooong lines with visual-line-mode
@ 2009-09-02  3:21 Allan Gottlieb
  2009-09-02  7:53 ` Peter Dyballa
  2009-09-02  8:32 ` Lennart Borgman
  0 siblings, 2 replies; 7+ messages in thread
From: Allan Gottlieb @ 2009-09-02  3:21 UTC (permalink / raw)
  To: help-gnu-emacs

(I am using emacs 23.1)
Start with emacs -Q and a buffer in fundamental mode

Consider a line wider than the frame, for example

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

which exceeds an 80 column frame.
Now assume you have a short line say
yyyy
followed by the above long line, i.e.
yyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

So far so good.  Now indent the long line with say one space.
If visual-line-mode is OFF, I see what I expect, the long line is
preceded by one space.

But with visual-line-mode ON, a blank line appears on the screen between
the short and long lines, i.e. the long line (with only one word) was
wrapped.
This behavior seems wrong.  I am getting burned in the following case
among others with html

<ol>
  <li>
    <a
      href="a-looong-url-that-naturally-contains-no-blanks">
      go here
    </a>

When the looog-url exceeds the line length a blank line appears
after the <a

I realize the blank line is not in the file so the browser is not
affected, but I find a plus of html to be that it reads well in emacs
even when not formatted (by say w3m).

Am I correct in viewing this as a bug?  If so I will file a bug report.

thanks,
allan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
  2009-09-02  3:21 trouble indenting looooong lines with visual-line-mode Allan Gottlieb
@ 2009-09-02  7:53 ` Peter Dyballa
  2009-09-02  8:32 ` Lennart Borgman
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-09-02  7:53 UTC (permalink / raw)
  To: Allan Gottlieb; +Cc: help-gnu-emacs


Am 02.09.2009 um 05:21 schrieb Allan Gottlieb:

> Am I correct in viewing this as a bug?


No. Visual-line-mode is the bug. IMO. I switched it off ( '(line-move- 
visual nil) in customisation section). It's to weird to be part of  
(weird) GNU Emacs.

--
Greetings

   Pete

I wouldn't recommend sex, drugs or insanity for everyone, but they've  
always worked for me.
				– Hunter S. Thompson







^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
  2009-09-02  3:21 trouble indenting looooong lines with visual-line-mode Allan Gottlieb
  2009-09-02  7:53 ` Peter Dyballa
@ 2009-09-02  8:32 ` Lennart Borgman
  2009-09-02 14:13   ` Allan Gottlieb
  1 sibling, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2009-09-02  8:32 UTC (permalink / raw)
  To: Allan Gottlieb; +Cc: help-gnu-emacs

On Wed, Sep 2, 2009 at 5:21 AM, Allan Gottlieb<gottlieb@nyu.edu> wrote:

> Am I correct in viewing this as a bug?  If so I will file a bug report.


Yes, of course. Please file a bug report.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
  2009-09-02  8:32 ` Lennart Borgman
@ 2009-09-02 14:13   ` Allan Gottlieb
  0 siblings, 0 replies; 7+ messages in thread
From: Allan Gottlieb @ 2009-09-02 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

At Wed, 02 Sep 2009 10:32:04 +0200 Lennart Borgman <lennart.borgman@gmail.com> wrote:

> On Wed, Sep 2, 2009 at 5:21 AM, Allan Gottlieb<gottlieb@nyu.edu> wrote:
>
>> Am I correct in viewing this as a bug?  If so I will file a bug report.
>
> Yes, of course. Please file a bug report.

Done.
allan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
       [not found] <mailman.5828.1251861686.2239.help-gnu-emacs@gnu.org>
@ 2009-09-02 16:16 ` Xah Lee
  2009-09-03 18:09   ` Allan Gottlieb
       [not found]   ` <mailman.5962.1252001397.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Xah Lee @ 2009-09-02 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 1, 8:21 pm, Allan Gottlieb <gottl...@nyu.edu> wrote:
> (I am using emacs 23.1)
> Start with emacs -Q and a buffer in fundamental mode
>
> Consider a line wider than the frame, for example
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> which exceeds an 80 column frame.
> Now assume you have a short line say
> yyyy
> followed by the above long line, i.e.
> yyyy
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> So far so good.  Now indent the long line with say one space.
> If visual-line-mode is OFF, I see what I expect, the long line is
> preceded by one space.
>
> But with visual-line-mode ON, a blank line appears on the screen between
> the short and long lines, i.e. the long line (with only one word) was
> wrapped.
> This behavior seems wrong.  I am getting burned in the following case
> among others with html
>
> <ol>
>   <li>
>     <a
>       href="a-looong-url-that-naturally-contains-no-blanks">
>       go here
>     </a>
>
> When the looog-url exceeds the line length a blank line appears
> after the <a
>
> I realize the blank line is not in the file so the browser is not
> affected, but I find a plus of html to be that it reads well in emacs
> even when not formatted (by say w3m).
>
> Am I correct in viewing this as a bug?  If so I will file a bug report.

it's not a bug. It's a natural behavior of smart word wrapping. Try
that in any word processor, you see the same behavior.

The problem is that you have this un-natural long string, those 80 or
so x. Not human language or computer lang have such long string as
words.

for plain text, sure that happens, originated in 1980s as a hack of
using ASCII pict to emulate a horizontal line. i.e. in html it's <hr>.
Such a hack is less and less used today. If you must use it, word wrap
(aka emacs's visual-line-mode) is not suitable.

all this has to to with physical formatting, a mindset particularly
started by unix idiots. For references, see:

• A Simple Lisp Code Formatter
  http://xahlee.org/emacs/lisp_formatter.html

• A Text Editor Feature: Extend Selection By Semantic Unit
  http://xahlee.org/emacs/syntax_tree_walk.html

• The Harm of Hard-wrapping Lines
  http://xahlee.org/UnixResource_dir/writ/hard-wrap.html

• Tabs versus Spaces in Source Code
  http://xahlee.org/UnixResource_dir/writ/tabs_vs_spaces.html

• Plain-Text Email Fetish
  http://xahlee.org/UnixResource_dir/writ/plain_text.html

• A Text Editor Feature: Extend Selection By Semantic Unit
  http://xahlee.org/emacs/syntax_tree_walk.html

• Fundamental Problems of Lisp
  http://xahlee.org/UnixResource_dir/writ/lisp_problems.html

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
  2009-09-02 16:16 ` Xah Lee
@ 2009-09-03 18:09   ` Allan Gottlieb
       [not found]   ` <mailman.5962.1252001397.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Allan Gottlieb @ 2009-09-03 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

At Wed, 02 Sep 2009 09:16:58 -0700 (PDT) Xah Lee <xahlee@gmail.com> wrote:

> On Sep 1, 8:21 pm, Allan Gottlieb <gottl...@nyu.edu> wrote:
>> (I am using emacs 23.1)
>> Start with emacs -Q and a buffer in fundamental mode
>>
>> Consider a line wider than the frame, for example
>>
>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> which exceeds an 80 column frame.
>> Now assume you have a short line say
>> yyyy
>> followed by the above long line, i.e.
>> yyyy
>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> So far so good.  Now indent the long line with say one space.
>> If visual-line-mode is OFF, I see what I expect, the long line is
>> preceded by one space.
>>
>> But with visual-line-mode ON, a blank line appears on the screen between
>> the short and long lines, i.e. the long line (with only one word) was
>> wrapped.
>> This behavior seems wrong.  I am getting burned in the following case
>> among others with html
>>
>> <ol>
>>   <li>
>>     <a
>>       href="a-looong-url-that-naturally-contains-no-blanks">
>>       go here
>>     </a>
>>
>> When the looog-url exceeds the line length a blank line appears
>> after the <a
>>
>> I realize the blank line is not in the file so the browser is not
>> affected, but I find a plus of html to be that it reads well in emacs
>> even when not formatted (by say w3m).
>>
>> Am I correct in viewing this as a bug?  If so I will file a bug report.
>
> it's not a bug. It's a natural behavior of smart word wrapping. Try
> that in any word processor, you see the same behavior.

False.  I just now tried openoffice (writer) and it gives what I
expected: the long line of x's preceded by one blank.

allan





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: trouble indenting looooong lines with visual-line-mode
       [not found]   ` <mailman.5962.1252001397.2239.help-gnu-emacs@gnu.org>
@ 2009-09-03 18:32     ` Joost Kremers
  0 siblings, 0 replies; 7+ messages in thread
From: Joost Kremers @ 2009-09-03 18:32 UTC (permalink / raw)
  To: help-gnu-emacs

Allan Gottlieb wrote:
> At Wed, 02 Sep 2009 09:16:58 -0700 (PDT) Xah Lee <xahlee@gmail.com> wrote:
>> On Sep 1, 8:21 pm, Allan Gottlieb <gottl...@nyu.edu> wrote:
>>> <ol>
>>>   <li>
>>>     <a
>>>       href="a-looong-url-that-naturally-contains-no-blanks">
>>>       go here
>>>     </a>
>>>
>>> When the looog-url exceeds the line length a blank line appears
>>> after the <a
>>
>> it's not a bug. It's a natural behavior of smart word wrapping. Try
>> that in any word processor, you see the same behavior.
>
> False.  I just now tried openoffice (writer) and it gives what I
> expected: the long line of x's preceded by one blank.

and with one x on the next line. you can't have it both ways. either the whole
line of x's moves to the next line, or a single x does.


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-03 18:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02  3:21 trouble indenting looooong lines with visual-line-mode Allan Gottlieb
2009-09-02  7:53 ` Peter Dyballa
2009-09-02  8:32 ` Lennart Borgman
2009-09-02 14:13   ` Allan Gottlieb
     [not found] <mailman.5828.1251861686.2239.help-gnu-emacs@gnu.org>
2009-09-02 16:16 ` Xah Lee
2009-09-03 18:09   ` Allan Gottlieb
     [not found]   ` <mailman.5962.1252001397.2239.help-gnu-emacs@gnu.org>
2009-09-03 18:32     ` Joost Kremers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.