GNU bug report logs - #34160
json-pretty-print deletes everything after first JSON object

Previous Next

Package: emacs;

Reported by: Albert Heinle <albert.heinle <at> googlemail.com>

Date: Mon, 21 Jan 2019 18:01:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 34160 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: bug#34160: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el
Date: Wed, 31 Jul 2019 20:41:32 +0200
Tassilo Horn <tsdh <at> gnu.org> writes:

> when fixing bug#34160 you've reverted my changes that made json pretty
> printing use replace-region-contents.  That had the major benefit that
> pretty printing the JSON object at point didn't move point.  I use that
> many times a week on large JSON objects using the following command.

[...]

> AFAICS, the problem in bug#34160 was not caused by my changes (the user
> used Emacs 24 and not a 27 snapshot) so I see no justification for
> removing my feature.

The user referred to
"http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/json.el#n740",
which doesn't look like Emacs 24?

> Could you please reinstall the feature or describe why it is not
> feasible to keep it?

As the bug in question described -- pretty-printing a JSON region would
silently delete everything but the first JSON object, which doesn't seem
like optimal behaviour for a pretty-printing function.

If there's a problem where point is moved unnecessarily, then that
should be fixed, of course.  Do you have a test case?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.