From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el Date: Wed, 31 Jul 2019 09:39:00 +0200 Message-ID: <87ef26ac17.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="2619"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 34160@debbugs.gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 31 09:39:21 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsjCj-0000WI-6l for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 09:39:21 +0200 Original-Received: from localhost ([::1]:38482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsjCg-0006zK-3X for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 03:39:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52366) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsjCX-0006zB-Am for emacs-devel@gnu.org; Wed, 31 Jul 2019 03:39:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hsjCW-0006Zt-1W; Wed, 31 Jul 2019 03:39:08 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:45263) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1hsjCT-0003qi-JE; Wed, 31 Jul 2019 03:39:05 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 19191223BE; Wed, 31 Jul 2019 03:39:05 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 31 Jul 2019 03:39:05 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleeggdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgfgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhilhho ucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecukfhppedufeegrdduudelrddvge drudelheenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpe epghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Original-Received: from jiffyarch (j289989.servers.jiffybox.net [134.119.24.195]) by mail.messagingengine.com (Postfix) with ESMTPA id 12226380079; Wed, 31 Jul 2019 03:39:03 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:239046 Archived-At: Archived-At: Hi Lars, 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. --8<---------------cut here---------------start------------->8--- (defun th/json-pretty-print-snippet-at-point (&optional minimize) "Pretty-print the json snippet at point." (interactive "P") (save-excursion (when-let ((beg (car (nth 9 (syntax-ppss))))) (goto-char beg) (forward-sexp) (when (looking-back "\n" beg) (backward-char)) (json-pretty-print beg (point) minimize)))) --8<---------------cut here---------------end--------------->8--- 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. Could you please reinstall the feature or describe why it is not feasible to keep it? Thanks, Tassilo