all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "N. Raghavendra" <nyraghu27132@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: nXML mode maintenance and enhancement
Date: Wed, 23 May 2018 22:45:04 +0530	[thread overview]
Message-ID: <87y3gab8fb.fsf@gmail.com> (raw)
In-Reply-To: <CAP_d_8XRTOqB8V7RjV0wKD5Y2swX6M6JYPPxg-LnZQCNjeJJjw@mail.gmail.com> (Yuri Khan's message of "Wed, 23 May 2018 22:15:05 +0700")

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 <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/



  reply	other threads:[~2018-05-23 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 12:14 nXML mode maintenance and enhancement N. Raghavendra
2018-05-23 14:18 ` Yuri Khan
2018-05-23 14:48   ` N. Raghavendra
2018-05-23 15:15     ` Yuri Khan
2018-05-23 17:15       ` N. Raghavendra [this message]
2018-05-23 16:12 ` Stefan Monnier
2018-05-23 17:34   ` N. Raghavendra
2018-05-23 17:49     ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=87y3gab8fb.fsf@gmail.com \
    --to=nyraghu27132@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.