From: "N. Raghavendra" <nyraghu27132@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: nXML mode maintenance and enhancement
Date: Wed, 23 May 2018 20:18:11 +0530 [thread overview]
Message-ID: <87d0xmctsk.fsf@gmail.com> (raw)
In-Reply-To: <CAP_d_8XYPP75oBLqzXbJcvZMX5dE_05TPqi6RdW+b5AnJanvWg@mail.gmail.com> (Yuri Khan's message of "Wed, 23 May 2018 21:18:55 +0700")
At 2018-05-23T21:18:55+07:00, Yuri Khan wrote:
> There is not and cannot be One True Way to indent XML, for all users and
> uses of nXML.
Sure, the user can always change it. Every mode comes with a default
indentation style. I am only suggesting that the default indentation
rules of nXML conform to those of the SGML and PSGML modes.
> XML formats are used for text markup languages such as XHTML and DocBook;
> configuration files; and various data files. The indentation rules in
> ‘nxml-indent-line’ are very much oriented towards data files — as in, “add
> a level of indentation for every unclosed opening tag; remove a level of
> indentation for every closing tag opened elsewhere, independent of the
> actual tag names”. I am not well acquainted with PSGML, but I suspect that
> it is is more text-markup-oriented.
Yes, and PSGML provides a many more editing facilities for authors of
documents, than does nXML.
> I sort-of can do that now. This involves: hooking ‘rng-schema-change-hook’;
> in the hook function, looking at ‘rng-current-schema’ to see if its ‘caddr’
> is "html"; and, if so, pointing ‘indent-line-function’ at my own function
> that pretty much has to reimplement the whole of ‘nxml-indent-line’ from
> scratch, in about 250 lines of Elisp.
I wonder if you can share your code here; perhaps I or someone else can
try to adapt it into a general function in nXML.
>> b) Support for processing instructions such as, e.g.,
>
>> <?PSGML ELEMENT foo nofill=t>
>
>> which specify that a `foo' element should not be disturbed when
>> filling a region; this is useful if one wants to fill a buffer
>> containing verbatim elements such as program listings.
Sure, one can have both the PI and variable customisation methods. PIs
for editing have been a common facility in SGML and XML; for instance,
just today I saw that XMLMind has a PI mechanism for associating a RELAX
NG schema with a document.
Raghu.
--
N. Raghavendra <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/
next prev parent reply other threads:[~2018-05-23 14:48 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 [this message]
2018-05-23 15:15 ` Yuri Khan
2018-05-23 17:15 ` N. Raghavendra
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
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=87d0xmctsk.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 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).