unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: mah@everybody.org (Mark A. Hershberger)
To: emacs-devel@gnu.org
Cc: Eric Lilja <mindcooler@gmail.com>
Subject: Re: Bug in nxml-mode (indentation)?
Date: Mon, 17 Dec 2007 22:46:37 -0500	[thread overview]
Message-ID: <8763ywvf4y.fsf@everybody.org> (raw)
In-Reply-To: fk6ra5$htm$1@ger.gmane.org

Eric Lilja <mindcooler@gmail.com> 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:

    <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.

-- 
http://hexmode.com/
GPG Fingerprint: 7E15 362D A32C DFAB E4D2  B37A 735E F10A 2DFC BFF5

The most beautiful experience we can have is the mysterious.
    -- Albert Einstein, The World As I See it

  reply	other threads:[~2007-12-18  3:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 21:56 Bug in nxml-mode (indentation)? Eric Lilja
2007-12-18  3:46 ` Mark A. Hershberger [this message]
2007-12-18  9:15   ` Eric Lilja
2007-12-18  9:38     ` Jason Rumney
2007-12-18  9:46       ` Eric Lilja
2007-12-18 10:23         ` Jason Rumney
2007-12-18 10:52           ` Eric Lilja
2007-12-18 11:29             ` Jason Rumney
2007-12-18 12:55               ` Eric Lilja
2007-12-18 20:59               ` Edward O'Connor
2007-12-18 21:53                 ` Eric Lilja
2007-12-21  2:05                   ` Edward O'Connor
2007-12-18 20:10           ` Lennart Borgman (gmail)
2007-12-21  0:41   ` Stefan Monnier
2007-12-21  4:05     ` Mark A. Hershberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763ywvf4y.fsf@everybody.org \
    --to=mah@everybody.org \
    --cc=emacs-devel@gnu.org \
    --cc=mindcooler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).