unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34160: json-pretty-print deletes everything after first JSON object
@ 2019-01-21 17:46 Albert Heinle
  2019-07-09 18:41 ` Lars Ingebrigtsen
       [not found] ` <87ef26ac17.fsf@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Albert Heinle @ 2019-01-21 17:46 UTC (permalink / raw)
  To: 34160

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1373 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-08-02 16:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 17:46 bug#34160: json-pretty-print deletes everything after first JSON object Albert Heinle
2019-07-09 18:41 ` Lars Ingebrigtsen
2019-07-10  8:53   ` Glenn Morris
2019-07-10 11:24     ` Lars Ingebrigtsen
     [not found] ` <87ef26ac17.fsf@gnu.org>
2019-07-31 15:38   ` bug#34160: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el Eli Zaretskii
     [not found]   ` <837e7yi57y.fsf@gnu.org>
2019-07-31 18:40     ` Tassilo Horn
     [not found]     ` <16c4954f400.27dc.69bc538c4644581689883e654f15bce0@gnu.org>
2019-07-31 18:48       ` Eli Zaretskii
2019-07-31 18:41   ` Lars Ingebrigtsen
     [not found]   ` <87a7cuvyg3.fsf@mouse.gnus.org>
2019-07-31 19:30     ` Tassilo Horn
     [not found]     ` <16c4982bea8.27dc.69bc538c4644581689883e654f15bce0@gnu.org>
2019-07-31 20:21       ` Lars Ingebrigtsen
     [not found]       ` <87v9vinefd.fsf@mouse.gnus.org>
2019-08-01  4:54         ` Tassilo Horn
     [not found]         ` <877e7xjxjj.fsf@gnu.org>
2019-08-01 11:11           ` Lars Ingebrigtsen
     [not found]           ` <87ef25nns3.fsf@mouse.gnus.org>
2019-08-01 12:16             ` Tassilo Horn
     [not found]             ` <8736iljd31.fsf@gnu.org>
2019-08-02 16:16               ` Tassilo Horn

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).