From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: Albert Heinle Newsgroups: gmane.emacs.bugs Subject: bug#34160: json-pretty-print deletes everything after first JSON object Date: Mon, 21 Jan 2019 12:46:35 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c7a076057ffb7103" Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="193909"; mail-complaints-to="usenet@ciao.gmane.org" To: 34160@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 21 19:01:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gldsl-000oLm-W2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jan 2019 19:01:12 +0100 Original-Received: from localhost ([127.0.0.1]:57296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gldsl-00022Y-16 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jan 2019 13:01:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gldse-00020v-Cf for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 13:01:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gldsc-0006v0-Bg for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 13:01:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gldsc-0006uP-4w for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 13:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gldsb-0003tj-Ux for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 13:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Albert Heinle Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Jan 2019 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34160 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154809361314913 (code B ref -1); Mon, 21 Jan 2019 18:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2019 18:00:13 +0000 Original-Received: from localhost ([127.0.0.1]:40410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gldro-0003sT-BT for submit@debbugs.gnu.org; Mon, 21 Jan 2019 13:00:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gldey-0003Ye-Em for submit@debbugs.gnu.org; Mon, 21 Jan 2019 12:46:56 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gldet-0002SM-6n for submit@debbugs.gnu.org; Mon, 21 Jan 2019 12:46:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gldes-0007IT-9E for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 12:46:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glder-0002RL-A1 for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 12:46:50 -0500 Original-Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:34638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glder-0002QN-1i for bug-gnu-emacs@gnu.org; Mon, 21 Jan 2019 12:46:49 -0500 Original-Received: by mail-ua1-x929.google.com with SMTP id c24so7197263uak.1 for ; Mon, 21 Jan 2019 09:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ln+Rk4+tMvXvLv1GgucXzJeOnRsMetnWfQzPjDOi/dI=; b=cdA/Gtsb0sCBz2R7XtySGoYNSlYWYDRNyrFlit77/X1WBiwcwxkJnDJsiyj/x/NKEh Q8TIfh3XxselsaJRwPHph77VyMX9c1Msh5Oez+HoVlgacg6R4octajYc3XceY4d/C56L vUfzzPeG4l7rk+/teUi2+ki8Zivxm690MGvsAivMV9CYkB2U2RjM8yf/Um9rm2pxCLoX GgpuiFYpDsd0Se7PSOPr9r3NV6sjyrHnN2FhcVfkF79bBr7N37M4Ek5JQKWe3uLYMVSm ftF0kfYbCdk9DakURJMxiF57gFp1UCGlibBuN7XtcFlU/LpLAqVCYXZN7l+YCIO1UR8w N9Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ln+Rk4+tMvXvLv1GgucXzJeOnRsMetnWfQzPjDOi/dI=; b=NtBJiEwYje3JYHjBJxuAouVDF9J8unj9+pSqbBJAaE0KkuEv0CBxcU+O76XXTGVnn5 pgV9cbLrA/hbcbmMbS4P35Hpqp92sEn4zHp/EMCllCTrL4wT18gA+vapshkDpiOffdLm OmeCsYqeirEPCooAvu59em4nYVVE7B8y96Gpeig4lUaRty812M+d4J3rXosWutLC4cb7 z5yLz4pLGuQjrOkGp4+YmzwCcd0+ci+6Mz9ZXsM6q1712RkIa/2uK2LlaaA5mwq/Vg84 C3ZW0E3xCCwYbsjoU4GTxQj3Gj03s4yePHMP6H3DEUXBFf0NpJPdCqi3SAe7tFPfiZeL ftVw== X-Gm-Message-State: AJcUukfbe1QTrGAqgj/vdGTDLduN+7Pq7lQQ8uXPC0Gl6EaIYHg9/glF bPhN9iGKsMk4PqJrmgYKZaLDpG87MFktZHz9AcYv1hvt X-Google-Smtp-Source: ALg8bN4LFl695/YI+rDwfPm56cBeAPcxmtACfBcnGSMLGtd87nb6/2GtimWBJ1nNE6Mh7/HaiSAu4AfaOfKHCm5UNDM= X-Received: by 2002:ab0:7698:: with SMTP id v24mr8132895uaq.133.1548092805973; Mon, 21 Jan 2019 09:46:45 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 21 Jan 2019 13:00:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154646 Archived-At: --000000000000c7a076057ffb7103 Content-Type: text/plain; charset="UTF-8" Dear Emacs-dev team, I have observed the following behavior of the command json-pretty-print (http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/json.el#n740): Write {"a": 1}{"b": 2} into any Emacs buffer. Then, mark the whole section and run M-x json-pretty-print. The line is afterwards altered as { "a": 1 } This means, that any string after the first completely parsed JSON-object is being removed by this function. I would consider this unexpected, because information gets lost after calling a function that is just supposed to prettify things. My Emacs version: GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-20 on lcy01-07, modified by Debian I also have an Arch-linux system at home where I could also reproduce this behavior. Let me know if you have any other questions. Thank you very much, Albert Heinle --000000000000c7a076057ffb7103 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Emacs-dev team,

I have observe= d the following behavior of the command json-pretty-print
<= div>
Write

{"a": 1}{"= b": 2}

into any Emacs buffer. Then, mark the = whole section and run M-x json-pretty-print.
The line is afterwar= ds altered as
{
=C2=A0 "a": 1
}

=
This means, that any string after the first completely parsed JSON-obj= ect is being removed by this function. I would consider this unexpected, be= cause information gets lost after calling a function that is just supposed = to prettify things.

My Emacs version:
GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-20= on lcy01-07, modified by Debian

I also have an Ar= ch-linux system at home where I could also reproduce this behavior.

Let me know if you have any other questions.
Thank you very much,

Albert Heinle
--000000000000c7a076057ffb7103--