From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: two json.el bugs Date: Sat, 6 May 2017 01:44:59 +0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1494009960 9355 195.159.176.226 (5 May 2017 18:46:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 May 2017 18:46:00 +0000 (UTC) Cc: Emacs developers To: "Theresa O'Connor" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 05 20:45:53 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 1d6iEi-0002IR-PY for ged-emacs-devel@m.gmane.org; Fri, 05 May 2017 20:45:52 +0200 Original-Received: from localhost ([::1]:48510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6iEo-0006zU-C9 for ged-emacs-devel@m.gmane.org; Fri, 05 May 2017 14:45:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6iEG-0006zO-Ha for emacs-devel@gnu.org; Fri, 05 May 2017 14:45:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6iEF-0001KL-G3 for emacs-devel@gnu.org; Fri, 05 May 2017 14:45:24 -0400 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:37005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6iEF-0001Ht-7x for emacs-devel@gnu.org; Fri, 05 May 2017 14:45:23 -0400 Original-Received: by mail-wm0-x22f.google.com with SMTP id m123so14074916wma.0 for ; Fri, 05 May 2017 11:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SACsc8o+xVwTM6cIWL4Vmq+Er8dSSzGXNHfin1gRtX0=; b=W52DztHadQpLe/lwjselie7iCN5e7fhPIsEG9W80VKkHKupr/GEEhscbjI6vA6sVvg or2qMu9xh/x5fW87XfVEy6YMxmIYQn07i3Ri+Nrth3M9MSLXcMJPVAGUgMJoa82XaoV7 pLGRfZP6eSF6t032w+H1AUvJtq+lS0JqepYviKj7thxp2UJMV9da10osWsjrxw27Hpb+ vdjYTYvyH1LyzUMS0j/kEUtNTYlfDJc62r0yIXzft5qMsIJg4SM057QsqUbNnHQXBU8c tddulfRRQI/8EOOUPPct5iP/wjXez0HYQ/DgfWOQWGd5w1ywkcnez+0Jm3sb4wrzsBpz ahuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SACsc8o+xVwTM6cIWL4Vmq+Er8dSSzGXNHfin1gRtX0=; b=f5xlP9IvPts9FrnhNc0dlLxaT48fELfC6nn+PcmYZG4i11OX5F5c/qHeZkDY9TSTsw +0WD0YCIGsoa962Ez3fEwQPfXzR1faH72I3j194mxes20tigOnl7Kjr+ykUva/Eruo2X VAMjrzrrJOGfJ+k4+G8OlYpD+g6B2xAYTh/+MuRrmB5MkpR/xAXjXsppPQrEQJMKPAwb 6hUpr2P2QRydL8aGpRZxmq+EC4fan5F1DaZKzY8qpEXFaWrmgM1ZfsDqJBtUhgmipuc1 YdSSnLJieVy4lzy0q8s2GOq7uced9Kx/DHSAR3KSXhAuqrp2inFjWwf16QUNb5KVxLz+ ksaQ== X-Gm-Message-State: AN3rC/64DCwfxmpSksq5kvO+kQ9dTuHJVTVVQQITd00lS79mCLKPt7Pf 11MsLbsNkJ1fQyYgTBK+xKUJmkbdnw== X-Received: by 10.28.217.193 with SMTP id q184mr6051851wmg.111.1494009920377; Fri, 05 May 2017 11:45:20 -0700 (PDT) Original-Received: by 10.223.163.196 with HTTP; Fri, 5 May 2017 11:44:59 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: WXBiJSQeQ9lbD4vCR2xP8slgy6Y X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f 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:214580 Archived-At: On Sat, May 6, 2017 at 12:51 AM, Theresa O'Connor wrote: > 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]. [1]: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf 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.