unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 46764@debbugs.gnu.org, "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#46764: Extra ">" sails right past XML validator
Date: Fri, 26 Feb 2021 11:28:23 +0100	[thread overview]
Message-ID: <6CEF2B35-1F1C-42F2-AEE9-DB520F8ABD8C@acm.org> (raw)
In-Reply-To: <87v9afkwh3.fsf@gnus.org>

26 feb. 2021 kl. 10.30 skrev Lars Ingebrigtsen <larsi@gnus.org>:

>> ">" is not a special character at top level in XML; <M>></M> is well-formed.
>> 
>> I agree that it is an easy mistake to make and overlook. Perhaps an
>> optional warning would be helpful?
> 
> Well, if it is valid (and it is), then I don't really see how adding an
> optional warning here would be all that helpful, either -- it seems
> kinda beyond the remit of the validator here to teach XML syntax?

It's useful to prevent mistakes, not just following the standard to the letter. Given that the XML file is in an Emacs buffer there is a fair chance that it was hand-written, and then the extra ">" is likely to be unintended, especially since it can be somewhat hard to spot by a human.

Many other modes do similar things. For example, emacs-lisp-mode warns about useless backslashes in strings even though there is no actual syntax error. Think of it as a useful compiler warning.

> So I'm closing this bug report.

That's fine. Dan can reopen if he thinks nxml-mode really needs improvement.






  reply	other threads:[~2021-02-26 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 23:43 bug#46764: Extra ">" sails right past XML validator 積丹尼 Dan Jacobson
2021-02-25 15:48 ` Lars Ingebrigtsen
2021-02-26  9:21 ` Mattias Engdegård
2021-02-26  9:30   ` Lars Ingebrigtsen
2021-02-26 10:28     ` Mattias Engdegård [this message]
2021-02-27 10:44     ` 積丹尼 Dan Jacobson
2021-02-26 16:00   ` bug#46764: [External] : " Drew Adams

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=6CEF2B35-1F1C-42F2-AEE9-DB520F8ABD8C@acm.org \
    --to=mattiase@acm.org \
    --cc=46764@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=larsi@gnus.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).