[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in nxml-mode (indentation)?

From: Edward O'Connor
Subject: Re: Bug in nxml-mode (indentation)?
Date: Thu, 20 Dec 2007 18:05:03 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

Eric Lilja wrote:

>>> So there doesn't seem to be any harm in making the indentation
>>> behaviour give the most aesthetically pleasing results.
>> For what it's worth, nxml-mode's current indentation behavior is, to me,
>> more aesthetically pleasing than that of xml-mode.
> Even as it appears in my second example?

Well, consider nxml-mode's behavior with this:

  This is a test of the emergency broadcast system. <span>This is
  only a test. in the case of an actual emergency, something
  interesting would happen now.</span>

Essentially, "newline after start tag" tells nxml to treat that element
as block-level, whereas "element content immediately after start tag"
tells nxml to treat that element as inline-level. At least in the cases
of Atom, RSS, and XHTML, this heuristic pretty much nails the desired
behavior. In this example, do you really want line 2 of the paragraph to
be indented more than lines 1 and 3?

Edward O'Connor

Ense petit placidam sub libertate quietem.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]