From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#34160: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el Date: Wed, 31 Jul 2019 18:38:57 +0300 Message-ID: <837e7yi57y.fsf@gnu.org> References: <87ef26ac17.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="187871"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org, 34160@debbugs.gnu.org, emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 31 17:39:16 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 1hsqh9-000mlR-Ur for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 17:39:16 +0200 Original-Received: from localhost ([::1]:41888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsqh8-0005Qd-1x for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 11:39:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60268) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsqh3-0005QW-6n for emacs-devel@gnu.org; Wed, 31 Jul 2019 11:39:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hsqh3-0007Ey-2n; Wed, 31 Jul 2019 11:39:09 -0400 Original-Received: from [176.228.60.248] (port=1990 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hsqh1-0002Va-Ti; Wed, 31 Jul 2019 11:39:08 -0400 In-reply-to: <87ef26ac17.fsf@gnu.org> (message from Tassilo Horn on Wed, 31 Jul 2019 09:39:00 +0200) 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:239048 Archived-At: > From: Tassilo Horn > Date: Wed, 31 Jul 2019 09:39:00 +0200 > Cc: Lars Ingebrigtsen , 34160@debbugs.gnu.org > > 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? Oops, sorry about that. I think Lars is on vacation. If he doesn't respond in a day or two, I will revert the change until this issue is resolved.