help-gnu-emacs
[Top][All Lists]
Advanced

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

Exclude literal layout XML nodes from autoindentation


From: Sam Varshavchik
Subject: Exclude literal layout XML nodes from autoindentation
Date: Sun, 16 Aug 2009 12:39:45 -0400

I'm trying to figure out how to get emacs's autoindent, both Tab and indent-region, to work in the manner that I like, when editing XML documents, and specifically Docbook documents.

I'd like to be able to easily autoindent my document, except for a couple of XML nodes whose whitespace content is significant, like <literallayout> or <programlisting>. In simple XML major mode, when I re-indent a large reason, I then have to go back and undo all the indention added in all the <programlisting> nodes.

After some Googling, I tried nxml. After assigning the "Docbook" ID, according to nxml's docs (although it's not quite clear to me how nxml deals with different tags used by different versions of Docbook), I find that nxml-mode still autoindents XML nodes that have significant whitespace.

I also tried psgml, but it looks like psgml is having problems parsing Docbook DTDs. Found a bunch of ancient mailing list messages to that effect, and it looks like that this is still the case. The current released version of psgml, which is in Fedora, is 1.2.5, and it dated 2002. I built the "Alpha" releases of psgml, 1.3.1 and 1.3.2, and tried those -- they still can't parse Docbook DTDs.


Attachment: pgpSOtQ3f_qWN.pgp
Description: PGP signature


reply via email to

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