emacs-devel
[Top][All Lists]
Advanced

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

Re: nXML mode maintenance and enhancement


From: N. Raghavendra
Subject: Re: nXML mode maintenance and enhancement
Date: Wed, 23 May 2018 22:45:04 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

At 2018-05-23T22:15:05+07:00, Yuri Khan wrote:

> And I’m suggesting that text markup languages constitute a small portion of
> all XML-based formats,

Perhaps, but even SGML was mostly used in industry, and data was a key
form of content in that usage.  So, the SGML mode indentation cannot be
assumed to be specifically friendly to textual content, and unfriendly
to data-centric content.  Secondly, SGML and XML files with data content
are typically generated by a program, and processed by another, so
indentation doesn't matter for them; the whole document could be in one
long line.

In summary, the current indentation scheme of nXML is probably
irrelevant to data-centric usage, but is unfriendly to textual usage.
The (P)SGML type of indentation also is irrelevant to data-centric
usage; it is, however, friendly to textual usage, as it conforms with
the indentation schemes of other Emacs modes for structured markup, as
in AUCTeX:

\begin{theorem}Let us suppose that the noumena have nothing to do with
  necessity, since knowledge of the Categories is a posteriori.  Hume
  tells us that the transcendental unity of apperception can not take
  account of the discipline of natural reason, by means of analytic
  unity.\end{theorem}

\begin{corollary}
  It remains a mystery why the Ideal stands in need of reason.  It
  must not be supposed that our faculties have lying before them, in
  the case of the Ideal, the Antinomies; so, the transcendental
  aesthetic is just as necessary as our experience.
\end{corollary}

The above indentation is exactly the one (P)SGML mode gives in the same
situation.

In any case, I have been told recently that I am not the first person
who has complained about nXML indentation!

> and thus the default rules might be good enough for the majority of
> the formats.

Just as I am suggesting that the (P)SGML indentation rules are also good
enough for most types of usage.  They have the added advantage of being
similar to the default indentation styles of other similar modes.

> Why not.

Thanks for sharing that.  I haven't looked at it closely yet, but it
looks like one can mimic it to define variables whose values are alists
in which the car of every element is a schema, and cdr a list of
elements in that schema which need a certain kind of indentation.  I'll
try to cook up something, and report here.

Raghu.

--
N. Raghavendra <address@hidden>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/



reply via email to

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