From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: trouble indenting looooong lines with visual-line-mode Date: Wed, 2 Sep 2009 09:16:58 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1251921831 11621 80.91.229.12 (2 Sep 2009 20:03:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2009 20:03:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 02 22:03:45 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Miw3V-0005Vr-HR for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Sep 2009 22:03:45 +0200 Original-Received: from localhost ([127.0.0.1]:54721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Miw3V-0007Wo-1n for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Sep 2009 16:03:45 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!u16g2000pru.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 83 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1251908219 11418 127.0.0.1 (2 Sep 2009 16:16:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 2 Sep 2009 16:16:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u16g2000pru.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.43 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:172626 comp.emacs:98689 X-Mailman-Approved-At: Wed, 02 Sep 2009 16:02:30 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67772 Archived-At: On Sep 1, 8:21 pm, Allan Gottlieb 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 > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xx 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 > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xx 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 > >
    >
  1. > href=3D"a-looong-url-that-naturally-contains-no-blanks"> > go here > > > When the looog-url exceeds the line length a blank line appears > after the > 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
    . 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: =E2=80=A2 A Simple Lisp Code Formatter http://xahlee.org/emacs/lisp_formatter.html =E2=80=A2 A Text Editor Feature: Extend Selection By Semantic Unit http://xahlee.org/emacs/syntax_tree_walk.html =E2=80=A2 The Harm of Hard-wrapping Lines http://xahlee.org/UnixResource_dir/writ/hard-wrap.html =E2=80=A2 Tabs versus Spaces in Source Code http://xahlee.org/UnixResource_dir/writ/tabs_vs_spaces.html =E2=80=A2 Plain-Text Email Fetish http://xahlee.org/UnixResource_dir/writ/plain_text.html =E2=80=A2 A Text Editor Feature: Extend Selection By Semantic Unit http://xahlee.org/emacs/syntax_tree_walk.html =E2=80=A2 Fundamental Problems of Lisp http://xahlee.org/UnixResource_dir/writ/lisp_problems.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84