From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: two json.el bugs Date: Fri, 5 May 2017 12:25:25 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1494012379 11580 195.159.176.226 (5 May 2017 19:26:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 May 2017 19:26:19 +0000 (UTC) Cc: Emacs developers To: Yuri Khan , "Theresa O'Connor" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 05 21:26:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6irj-0002pf-2e for ged-emacs-devel@m.gmane.org; Fri, 05 May 2017 21:26:11 +0200 Original-Received: from localhost ([::1]:48629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6iro-0008Ua-IZ for ged-emacs-devel@m.gmane.org; Fri, 05 May 2017 15:26:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6irD-0008U9-QM for emacs-devel@gnu.org; Fri, 05 May 2017 15:25:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6ir9-0006CM-Op for emacs-devel@gnu.org; Fri, 05 May 2017 15:25:39 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29755) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6ir9-0006Aw-Ez for emacs-devel@gnu.org; Fri, 05 May 2017 15:25:35 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v45JPTZW004671 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 May 2017 19:25:30 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v45JPTlA003568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 May 2017 19:25:29 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v45JPRtC008496; Fri, 5 May 2017 19:25:28 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214582 Archived-At: > > 1. `json-skip-whitespace' uses a hardcoded list of whitespace > > characters, which means it fails to skip over other WSpace=3DY > > characters. It should probably use `search-whitespace-regexp' from > > isearch.el (or an equivalent value from elsewhere) instead. >=20 > JSON is defined by the standard [ECMA-404][1]... > Section 4, paragraph the last: >=20 > | 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). >=20 > In my copy of Emacs 25.1, json-skip-whitespace looks like this: >=20 > (defun json-skip-whitespace () > "Skip past the whitespace at point." > (skip-chars-forward "\t\r\n\f\b ")) >=20 > 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). >=20 > If anything, \f\b should be *removed* from characters to be skipped. +1