emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug in nxml-mode (indentation)?


From: Eric Lilja
Subject: Re: Bug in nxml-mode (indentation)?
Date: Tue, 18 Dec 2007 10:15:33 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Mark A. Hershberger wrote:
Thanks for the reply Mr Hershberger,

Eric Lilja <address@hidden> writes:

Is the nxml-mode way of indenting vs xml-mode in this particular
example to be considered a bug?

Space can be significant (i.e. can convey meaning) in XML and there is
no way to figure out what the space means just from the snippets you've
given.  Depending on the application, the following XML could be
considered identical or completely different:

Convey meaning? To whom? The parser? I had no idea. I just know that xml-mode and nxml-mode indents the example file differently and I like the old mode does better. Are you saying it affects validation and what you get when you parse the file?


    <foo>bar</foo>
or
    <foo>
      bar
    </foo>
or
    <foo>
    bar
    </foo>

If you want to adjust the indention of nxml-mode, look at
nxml-child-indent and nxml-attribute-indent.  Unfortunately, I don't see
anything to adjust indenting of lines that just contain text.

If you want to look at adding this functionality, the best place to
start looks like it would be the function
nxml-compute-indent-from-previous-line.


Well, since I'm not an elisp wizard I simply do not possess the know-how to "fix" it. :( I just thought I should report it this finding. (Actually, I have found another case where indentation differs and the old xml-mode, to me, is more pleasing.)

Oh, and btw, you don't have CC me I read the list through my newsreader (using gmane).

- Eric





reply via email to

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