all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Yuri Khan <yuri.v.khan@gmail.com>, "Theresa O'Connor" <hober0@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: RE: two json.el bugs
Date: Fri, 5 May 2017 12:25:25 -0700 (PDT)	[thread overview]
Message-ID: <ea95b080-40d3-402d-a998-8567d071fe95@default> (raw)
In-Reply-To: <CAP_d_8WA2JCf6ZWNdiyuuoVo9hBHziuF=ALCT+jpuuOyiafUwQ@mail.gmail.com>

> > 1. `json-skip-whitespace' uses a hardcoded list of whitespace
> > characters, which means it fails to skip over other WSpace=Y
> > characters. It should probably use `search-whitespace-regexp' from
> > isearch.el (or an equivalent value from elsewhere) instead.
> 
> JSON is defined by the standard [ECMA-404][1]...
> Section 4, paragraph the last:
> 
> | Insignificant whitespace is allowed before or after any token.
> | The whitespace characters are: character tabulation (U+0009),
> | line feed (U+000A), carriage return (U+000D), and space (U+0020).
> 
> In my copy of Emacs 25.1, json-skip-whitespace looks like this:
> 
> (defun json-skip-whitespace ()
>   "Skip past the whitespace at point."
>   (skip-chars-forward "\t\r\n\f\b "))
> 
> that is, it skips the whitespace characters defined by the spec, and
> in addition to that, also form feed (U+000C) and backspace (U+0007).
> 
> If anything, \f\b should be *removed* from characters to be skipped.

+1



  reply	other threads:[~2017-05-05 19:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 17:51 two json.el bugs Theresa O'Connor
2017-05-05 18:44 ` Yuri Khan
2017-05-05 19:25   ` Drew Adams [this message]
2017-05-20 15:51   ` [PATCH] Fix definition of whitespace in JSON Philipp Stephani
2017-05-20 17:28     ` Dmitry Gutov
2017-05-21 21:03       ` Philipp Stephani
2017-05-27 13:32   ` two json.el bugs Philipp Stephani
2017-05-27 13:48 ` Philipp Stephani
2017-05-28  1:30   ` Drew Adams
2017-05-28 18:47     ` Philipp Stephani
2017-05-28 22:12       ` Drew Adams
2017-05-28 22:44         ` Bruce V Chiarelli
2017-05-29  0:42           ` 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

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

  git send-email \
    --in-reply-to=ea95b080-40d3-402d-a998-8567d071fe95@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=hober0@gmail.com \
    --cc=yuri.v.khan@gmail.com \
    /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.